I need your help, I am trying to get over this problem and I don't know why I get an error message everytime when I click the button.
Here it the code:
Code:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim da As New System.Data.OleDb.OleDbDataAdapter("Select * From Table1", "Put an actual connection string here. THIS SHOULD NOT BE COPIED MINDLESSLY AND EXPECTED TO WORK") Dim dt As New DataTable da.Fill(dt) Dim img As Image For Each row As DataRow In dt.Rows img = Image.FromStream(New IO.MemoryStream(DirectCast(row.Item("NameOfImageColumn").Value, Byte()))) 'Do something with the image Next End Sub
Error: Format of the initialization string does not conform to specification starting at index 0.
It shows highlight on Dim da As New System.Data.OleDb.OleDbDataAdapter("Select * From Table1", "Put an actual connection string here. THIS SHOULD NOT BE COPIED MINDLESSLY AND EXPECTED TO WORK") as statement. What can I do to get this fix??
Thanks,
Mark




Reply With Quote