Click here to Skip to main content
15,906,567 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi friend I am getting an error The multi-part identifier "System.IO.FileStream" could not be bound.I have created an table in sql 2008 with table name upload an contain two column filename and file data I want to upload file data to sql server database file data has data type varbinary(MAX) I am using filestream to store data

C#
SqlDataAdapter sda=new SqlDataAdapter("insert into upload(fileName,FileData) values('"+pathName+"',"+oFileStream+")",con);
               DataSet ds=new DataSet();
               sda.Fill(ds,"upload")


please help me.
Posted
Comments
Sergey Alexandrovich Kryukov 26-Sep-11 3:05am    
What is "multi-part identifier"?! Where FileStream is not found? How come you expect it in database?
--SA
maheshpardeshi 26-Sep-11 3:09am    
I want to upload my text file to sql data base is there any method to insert text file to sql db using sqldataadapter
Dirk C De Winnaar 26-Sep-11 11:03am    
http://technet.microsoft.com/en-us/sqlserver/Video/dd941934
http://www.sqlteam.com/article/using-bulk-insert-to-load-a-text-file

Here's two links to look at.....

Have fun!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900