Click here to Skip to main content
15,922,015 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: .exe?... VB.NET Pin
Coding C#1-Sep-06 21:57
Coding C#1-Sep-06 21:57 
GeneralRe: .exe?... VB.NET Pin
Aaron1282-Sep-06 7:30
Aaron1282-Sep-06 7:30 
GeneralRe: .exe?... VB.NET Pin
Dave Kreskowiak2-Sep-06 7:47
mveDave Kreskowiak2-Sep-06 7:47 
GeneralRe: .exe?... VB.NET Pin
Aaron1282-Sep-06 8:21
Aaron1282-Sep-06 8:21 
QuestionReading attributes from a non-valid XML file Pin
re infecta1-Sep-06 10:50
re infecta1-Sep-06 10:50 
QuestionSearch engine Pin
johnjsm1-Sep-06 9:44
johnjsm1-Sep-06 9:44 
AnswerRe: Search engine Pin
The ANZAC3-Sep-06 1:52
The ANZAC3-Sep-06 1:52 
QuestionHELP FOR saving image to sql database error Pin
Lisana1-Sep-06 6:41
Lisana1-Sep-06 6:41 
I'm trying to save the image to sql database, there is error "object must implement Iconvertible" when I run it. Here is my code:

(image is the location + the name of the image)
Try
Dim strFn As String = image
Dim fiImage As FileInfo = New FileInfo(strFn)
Me.m_lImageFileLength = fiImage.Length
Dim fs As FileStream = New FileStream(strFn, FileMode.Open, FileAccess.Read, FileShare.Read)
m_barrImg = New Byte(Convert.ToInt32(Me.m_lImageFileLength)) {}
Dim iBytesRead As Integer = fs.Read(m_barrImg, 0, Convert.ToInt32(Me.m_lImageFileLength))
fs.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Try
Me.SqlConnection1.Open()
If SqlCommand1.Parameters.Count = 0 Then
Me.SqlCommand1.CommandText = "UPDATE HRRecordIndexData SET pdf_location = @Picture WHERE entity_id = @ID"
Me.SqlCommand1.Parameters.Add("@Picture", System.Data.SqlDbType.Image)
Me.SqlCommand1.Parameters.Add("@ID", System.Data.SqlDbType.Int, 4)
End If
Me.SqlCommand1.Parameters("@Picture").Value = Me.m_barrImg
Me.SqlCommand1.Parameters("@ID").Value = Entity
Me.SqlCommand1.ExecuteNonQuery()
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
Me.SqlConnection1.Close()
End Try

If there is everyone knows what it needs to fix at my code, I would very appreciate it .. thanks!


Lisa

AnswerRe: HELP FOR saving image to sql database error Pin
Raidze1-Sep-06 7:19
Raidze1-Sep-06 7:19 
GeneralRe: HELP FOR saving image to sql database error Pin
Lisana1-Sep-06 8:40
Lisana1-Sep-06 8:40 
GeneralRe: HELP FOR saving image to sql database error Pin
Raidze1-Sep-06 10:20
Raidze1-Sep-06 10:20 
QuestionMove objects in panel Pin
bamnet1-Sep-06 5:52
bamnet1-Sep-06 5:52 
AnswerRe: Move objects in panel Pin
Dave Kreskowiak1-Sep-06 6:38
mveDave Kreskowiak1-Sep-06 6:38 
GeneralRe: Move objects in panel Pin
bamnet1-Sep-06 6:51
bamnet1-Sep-06 6:51 
GeneralRe: Move objects in panel Pin
Dave Kreskowiak1-Sep-06 6:55
mveDave Kreskowiak1-Sep-06 6:55 
AnswerRe: Move objects in panel Pin
bamnet6-Sep-06 6:49
bamnet6-Sep-06 6:49 
Questionvisual basic .net Pin
chirag22051-Sep-06 5:29
chirag22051-Sep-06 5:29 
AnswerRe: visual basic .net Pin
Dave Kreskowiak1-Sep-06 6:34
mveDave Kreskowiak1-Sep-06 6:34 
Questionprogramming newbie Pin
themusicman91-Sep-06 5:15
themusicman91-Sep-06 5:15 
AnswerRe: programming newbie Pin
Dave Kreskowiak1-Sep-06 6:33
mveDave Kreskowiak1-Sep-06 6:33 
AnswerRe: programming newbie Pin
The ANZAC3-Sep-06 2:02
The ANZAC3-Sep-06 2:02 
GeneralRe: programming newbie Pin
EvoFreak4-Sep-06 11:01
EvoFreak4-Sep-06 11:01 
Questionmodifing parameters in select command Pin
dptalt1-Sep-06 3:53
dptalt1-Sep-06 3:53 
AnswerRe: modifing parameters in select command Pin
Colin Angus Mackay1-Sep-06 4:30
Colin Angus Mackay1-Sep-06 4:30 
GeneralRe: modifing parameters in select command Pin
dptalt1-Sep-06 6:56
dptalt1-Sep-06 6: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.