Click here to Skip to main content
15,392,679 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: face identification and recognition with visual Basic 2010 Pin
CHill6024-Nov-21 0:32
mveCHill6024-Nov-21 0:32 
QuestionHOW TO CODE A REFRESH BUTTON IN VB.NET FORM Pin
WAHID ASSOCIATES8-Nov-21 9:09
MemberWAHID ASSOCIATES8-Nov-21 9:09 
AnswerRe: HOW TO CODE A REFRESH BUTTON IN VB.NET FORM Pin
Member 153296138-Nov-21 10:39
MemberMember 153296138-Nov-21 10:39 
AnswerRe: HOW TO CODE A REFRESH BUTTON IN VB.NET FORM Pin
Dave Kreskowiak8-Nov-21 11:38
mveDave Kreskowiak8-Nov-21 11:38 
AnswerRe: HOW TO CODE A REFRESH BUTTON IN VB.NET FORM Pin
Mycroft Holmes8-Nov-21 11:50
professionalMycroft Holmes8-Nov-21 11:50 
GeneralRe: HOW TO CODE A REFRESH BUTTON IN VB.NET FORM Pin
den2k888-Nov-21 21:49
professionalden2k888-Nov-21 21:49 
GeneralRe: HOW TO CODE A REFRESH BUTTON IN VB.NET FORM Pin
Eddy Vluggen10-Nov-21 5:44
professionalEddy Vluggen10-Nov-21 5:44 
QuestionSave, Retrieve Image on SQL Database using VB.net Pin
EngrImad6-Nov-21 10:42
MemberEngrImad6-Nov-21 10:42 
Hello;

I have image on PictureBox, Cinverted to Base64String string and saved in Database as following:


Dim ms As MemoryStream = New MemoryStream
Dim bmp As Bitmap = New Bitmap(PictureBox1.Image)
bmp.Save(ms, System.Drawing.Imaging.ImageFormat.jpg)
Dim My_Photo_Str As String = Convert.ToBase64String(ms.ToArray)

myqry = "update MYTABLE set COLUMN1=" & "'" & My_Photo_Str & "'" & "where COLUMN2=" & 50
mycmd = New OleDbCommand(myqry, conn)
mycmd.CommandTimeout = 0
mydr = mycmd.ExecuteReader

Now that image need to retrieve it or shows on PictureBox, So I used the following:-

myqry = "select * from MYTABLE where COLUMN2=" & 50
mycmd = New OleDbCommand(myqry, conn)
mycmd.CommandTimeout = 0
mydr = mycmd.ExecuteReader
mydr.Read()


Dim PIC As Byte()
PIC = mydr("COLUMN1")
Dim My_Photo = New MemoryStream(PIC)
PictureBox1.Image = Bitmap.FromStream(My_Photo) <<<<<-----HERE GOT ERROR

the error on last line while try to set image to PictureBox, and error said that cannot convert Byte() to image, If any help will so appreciated

thanks
AnswerRe: Save, Retrieve Image on SQL Database using VB.net Pin
RedDk6-Nov-21 11:10
MemberRedDk6-Nov-21 11:10 
AnswerRe: Save, Retrieve Image on SQL Database using VB.net Pin
Dave Kreskowiak6-Nov-21 12:09
mveDave Kreskowiak6-Nov-21 12:09 
SuggestionRe: Save, Retrieve Image on SQL Database using VB.net Pin
Richard Deeming8-Nov-21 21:48
mveRichard Deeming8-Nov-21 21:48 
QuestionGot a problem with the ffmpeg.exe Pin
meaeg26-Oct-21 8:48
Membermeaeg26-Oct-21 8:48 
AnswerRe: Got a problem with the ffmpeg.exe Pin
meaeg26-Oct-21 14:43
Membermeaeg26-Oct-21 14:43 
QuestionPrevent hacking of connection string over the internet Pin
Member 1537744030-Sep-21 6:37
MemberMember 1537744030-Sep-21 6:37 
AnswerRe: Prevent hacking of connection string over the internet Pin
Dave Kreskowiak30-Sep-21 8:06
mveDave Kreskowiak30-Sep-21 8:06 
GeneralRe: Prevent hacking of connection string over the internet Pin
Member 1537744030-Sep-21 8:20
MemberMember 1537744030-Sep-21 8:20 
GeneralRe: Prevent hacking of connection string over the internet Pin
Dave Kreskowiak30-Sep-21 9:10
mveDave Kreskowiak30-Sep-21 9:10 
GeneralRe: Prevent hacking of connection string over the internet Pin
Member 153296137-Oct-21 8:09
MemberMember 153296137-Oct-21 8:09 
GeneralRe: Prevent hacking of connection string over the internet Pin
Dave Kreskowiak7-Oct-21 8:11
mveDave Kreskowiak7-Oct-21 8:11 
AnswerRe: Prevent hacking of connection string over the internet Pin
Member 153296137-Oct-21 8:11
MemberMember 153296137-Oct-21 8:11 
GeneralRe: Prevent hacking of connection string over the internet Pin
Member 1537744010-Oct-21 7:00
MemberMember 1537744010-Oct-21 7:00 
GeneralRe: Prevent hacking of connection string over the internet Pin
Dave Kreskowiak10-Oct-21 7:10
mveDave Kreskowiak10-Oct-21 7:10 
GeneralRe: Prevent hacking of connection string over the internet Pin
Member 1532961311-Oct-21 1:10
MemberMember 1532961311-Oct-21 1:10 
GeneralRe: Prevent hacking of connection string over the internet Pin
Member 1537744011-Oct-21 8:22
MemberMember 1537744011-Oct-21 8:22 
GeneralRe: Prevent hacking of connection string over the internet Pin
Member 1532961311-Oct-21 9:56
MemberMember 1532961311-Oct-21 9:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.