View Full Version : ASP - Insert Multiple records
Yusrin
07-04-2003, 03:17 AM
I wanna know how to insert all the records that is checked into my SQL Server.. BUT all the records inserted is the same except for one column in my SQL Server which is the 'Partner' column..
Can someone help??
rdove
07-06-2003, 10:11 PM
I'm kinda having a hard time following what it is you are trying to accomplish...
Let me see...
Are you saying that you have some checkboxes on a page and you are trying to add the records associated from those text boxes into an SQL Server database, but the records don't change?
Try to post your code so me and others might be able to see where your problem is.
Yusrin
07-07-2003, 01:45 AM
Well... actually, my page(searchresults.asp) will show all the results that you searched for.. These results are from the sql server. All the datas are different. On the right of every record, there is a checkbox.
Now is the scenario..
After all records are shown, I will check a few checkboxes. Then i will click the button. All the data that is checked will be inserted in the sql server. But the thing is that all data records is different..
Its actually kinda off like the hotmail, where you checked a few boxes and put them into a different folder..
U got what i mean? I hope u can help...
putts
07-07-2003, 01:24 PM
There is no way to do a multiple insert with one sql string (without using a bunch of go statements).
However, I do have some very modular code to copy records from one table to another as long as the destination table has AT LEAST the same fields as the source table (though it could have more fields such as a folder name, user ID, etc. that could be set on the insert)
If you would like that code, let me know and I'll post it.
edgarq
08-07-2003, 12:59 PM
Yusrin,
There is a way. I'll put together a sample for you then you can modify to suit your needs.
Reply to this email if you don't need it anymore.
Ed
vBulletin® v3.6.7, Copyright ©2000-2010, Jelsoft Enterprises Ltd.