Hello, i have some jpg images stored in a "image" field on sql server 2016 database.
I always conected to that database using Job1.PostString(ip of aspx parser file, the query i want to do i.e. SELECT IARCH FROM MYIMAGESTABLE)
I have read this sample in forum:
Sub ReadBlob
Dim Cursor1 As Cursor = SQL1.ExecQuery2("SELECT image FROM table2 WHERE name = ?", Array As String("smiley"))
Cursor1.Position = 0
Dim Buffer() As Byte = Cursor1.GetBlob("image")
Dim InputStream1 As InputStream
InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
Dim Bitmap1 As Bitmap
Bitmap1.Initialize2(InputStream1)
InputStream1.Close
Activity.SetBackgroundImage(Bitmap1)
End Sub
But i dont know how to do the same, but using Job1.PosString query... In Jobdone i use a "map" variable to read the table fields, but i dont have something as "GetBlob".
Can someone help me? An example will be great! Please apologize my english.
Mariano.
I always conected to that database using Job1.PostString(ip of aspx parser file, the query i want to do i.e. SELECT IARCH FROM MYIMAGESTABLE)
I have read this sample in forum:
Sub ReadBlob
Dim Cursor1 As Cursor = SQL1.ExecQuery2("SELECT image FROM table2 WHERE name = ?", Array As String("smiley"))
Cursor1.Position = 0
Dim Buffer() As Byte = Cursor1.GetBlob("image")
Dim InputStream1 As InputStream
InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
Dim Bitmap1 As Bitmap
Bitmap1.Initialize2(InputStream1)
InputStream1.Close
Activity.SetBackgroundImage(Bitmap1)
End Sub
But i dont know how to do the same, but using Job1.PosString query... In Jobdone i use a "map" variable to read the table fields, but i dont have something as "GetBlob".
Can someone help me? An example will be great! Please apologize my english.
Mariano.