Hi,
ich versuche seit Stunden ein Bild aus einer MSSQL DB in einer PictureBox anzuzeigen, ich schaffe es aber einfach nicht.
Mein Code:
Wisst ihr weiter?
Grüße Benny
ich versuche seit Stunden ein Bild aus einer MSSQL DB in einer PictureBox anzuzeigen, ich schaffe es aber einfach nicht.
Mein Code:
VB.NET-Quellcode
- Dim con As New Odbc.OdbcConnection Dim cmd As New Odbc.OdbcCommand Dim reader As Odbc.OdbcDataReader con.ConnectionString = DSN & ";" _ & UID & ";" _ & PWD & ";"
- cmd.Connection = con cmd.CommandText = "SQL Abfrage"
- Try con.Open() reader = cmd.ExecuteReader() Do While reader.Read()
- Try PictureBox1.Image = Image.FromFile(reader("pict")) Catch ex As Exception MsgBox(ex.Message) End Try
- Loop
- reader.Close() con.Close()
- Catch ex As Exception MsgBox(ex.Message) End Try
Wisst ihr weiter?
Grüße Benny