I am using file upload control..in asp.net..storing files first in temp directory
and then after when user clicks on save I move files from temp to my desired location.
Problem is I have to used for loop and make 5 times trip to database for my insert query to insert 5 records.But I want to write single query for that.
I know that I can send my image name as well as image path comma seprated.but since i dont have enough knowledge of sql,I dont know how to split comma seprated files in sql and then using cursor insert them.So i request some one write me a sample query over here.so that i can proceed.
I am using file upload control..in asp.net..storing files first in temp directory and then
Share
Use can pass dataset as xml to stored procedure and in stored procedure you can insert multiple rows in one go using openXML
C# code for passing dataset object as xml to stored procedure
stored procedure, bulk insert using openXML
read this for complete example
http://www.codeproject.com/Articles/417181/Bulk-Insertion-of-Data-Using-Csharp-DataTable-and
===================================================================
if you looking for split string in sql
then below is the sql function that you need to create in sqlserver
and how to call
and then using cursor you can insert all
for split function, see this post http://social.msdn.microsoft.com/forums/en-US/transactsql/thread/4126a010-6885-4eb0-b79c-c798c90edb85