Hi
I am stored binary data in one table,in For loop gets binary data one by one,below is my code in that
fadts is datatable contains 3 rows,when first time it works fine,second time when goes to fill data in dataadapter it throws error,
For Each row1 As DataRow In fadts.Rows
callclearsql()
System.Threading.Thread.Sleep(2000)
Dim facons1 As New SqlConnection(My.Settings.CS)
facons1.Open()
Dim fadrs1 As New SqlDataAdapter("SELECT ID,DocumentExtension,DocumentName,[Document] FROM FileStore where ID=" & row1("ID").ToString & "", facons1)
Dim fadts1 As New DataTable
fadrs1.SelectCommand.CommandTimeout = 0
fadts1.Rows.Clear()
fadrs1.Fill(fadts1)
Writelog("above loop1.1")
Next
It work only first loop,second time it throws error,[Document] column contains binary data.
Pls reply asap
Regards
Aravind
What I have tried:
I did dispose,clear and close for fadrs1,fadts1 and sql connection,but even it throws error.