I would use a Stored procedure and execute the stored procedure by passing it the appropriate data
Something like this: CREATE PROCEDURE sp_uc_tlTelephone_AddNew_Cont @FK_ContID varchar(5), @Tel_Type varchar(50), @Tel_Number varchar(50), @IsPrimary varchar(50), @Active int AS Set nocount off Insert tl_Telephone (FK_ContID, Tel_Type, Tel_Number, IsPrimary, Active) Values( @FK_ContID, @Tel_Type, @Tel_Number, @IsPrimary, @Active ) GO The sp call in your code would look something like this: string strSql = "sp_uc_tlTelephone_AddNew_Cont '" + FK_ContID + "', '" + Tel_Type + "', '" + Tel_Number + "', '" + IsPrimary, Active you avoid messing with the quotes and figuring out the proper concatenation if you use a parameters object... Joe ----- Original Message ----- From: kuskaus To: [email protected] Sent: Sunday, December 26, 2004 10:35 AM Subject: [AspNetAnyQuestionIsOk] ASP.NET Hi I am just starting to work on ASP.NET at home .I did an guestbook entry and insert aspx pages.But on executing it i am not able to store the data in the table.There is no error in my program .What is it that i should remember when i am inserting a record in to a table. Regards Malathi Yahoo! Groups Sponsor ADVERTISEMENT ------------------------------------------------------------------------------ Yahoo! Groups Links a.. To visit your group on the web, go to: http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ b.. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor --------------------~--> $4.98 domain names from Yahoo!. Register anything. http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/saFolB/TM --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
