Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 how to insert multiple rows

Author  Topic 

mochi
Starting Member

2 Posts

Posted - 2008-05-23 : 06:42:19
i use asp.net , ms sql
i have 3 textboxs
i want to insert these into table1--> column ('name')
how to??


SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-05-23 : 07:08:34
You have to tear down them from your screen and catiously carry them over to the database server.
Then you have to open the third harddrive, unlock the cases and throw the textboxes gently on the track that says "Table1 here!".



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-05-23 : 08:33:59
Read this http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx
and you will understand why I wrote the way I did.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-05-23 : 14:01:30
quote:
Originally posted by mochi

i use asp.net , ms sql
i have 3 textboxs
i want to insert these into table1--> column ('name')
how to??





Refer this:-

http://www.aspfree.com/c/a/ASP.NET/Using-TSQL-Stored-Procedures-with-ASPNET-20/3/
Go to Top of Page

johnsql
Posting Yak Master

161 Posts

Posted - 2008-05-25 : 10:22:28
quote:
Originally posted by mochi

i use asp.net , ms sql
i have 3 textboxs
i want to insert these into table1--> column ('name')
how to??






You would make an asp.net Person class that has Name as a public property (Get; Set;) to hold name of each person object; each Name property of each Person object instance gets its value from each textbox when button Save is hit. Then, using .net collection generic List<Person> list to hold the 3 person objects. Next, using .net XML serialization class to serialize the Person list object;
On the backend SQL Server, you would call the backend stored procedure using sp_xml_preparedocument and sp_xml_removedocument to insert multiple input rows into your target table.
Hope this helps.
johnsql
Go to Top of Page
   

- Advertisement -