Click here to Skip to main content
15,887,214 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: XLL addin [modified] Pin
AlexesDad21-Jun-09 2:05
AlexesDad21-Jun-09 2:05 
QuestionWhy two files are under one process in task manager. _ vb.net 2008 Pin
Pankaj Garg1-Jun-09 23:26
Pankaj Garg1-Jun-09 23:26 
AnswerRe: Why two files are under one process in task manager. _ vb.net 2008 Pin
Christian Graus1-Jun-09 23:38
protectorChristian Graus1-Jun-09 23:38 
GeneralRe: Why two files are under one process in task manager. _ vb.net 2008 Pin
Pankaj Garg2-Jun-09 1:01
Pankaj Garg2-Jun-09 1:01 
GeneralRe: Why two files are under one process in task manager. _ vb.net 2008 Pin
JR2122-Jun-09 1:31
JR2122-Jun-09 1:31 
QuestionHow to save an image in access Pin
mirzamujib1-Jun-09 21:44
mirzamujib1-Jun-09 21:44 
AnswerRe: How to save an image in access Pin
Christian Graus1-Jun-09 21:53
protectorChristian Graus1-Jun-09 21:53 
GeneralRe: How to save an image in access Pin
mirzamujib2-Jun-09 0:55
mirzamujib2-Jun-09 0:55 
hello Mr.Graus

Actually i really got fedup by searching the procedure of "Saving an image in access" using vb.net2008.

i'm attaching here my code,please find it where iam going error.

Try
Dim conn As New OleDbConnection
Dim cmd As New OleDbCommand
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Contacts3\mycontacts.mdb;"

conn.Open()
cmd = conn.CreateCommand
cmd.CommandText = "Insert into mycontactstab(TextBox1.Text,TextBox2.Text,TextBox3.Text,TextBox4.Text,picturebox1.image) values(@Email1,@Email2,@Website,@Notes,@Image)"

Try
Dim imgbytearray As Byte
Dim stream As New MemoryStream
Dim bmp As New Bitmap(stream)
bmp.Save(stream, ImageFormat.Jpeg)
imgbytearray = stream.ToString() ''''might be here i'm going wrong'''''
stream.Close()
cmd.Parameters.AddWithValue("@Email1", TextBox1.Text)
cmd.Parameters.AddWithValue("@Email2", TextBox2.Text)
cmd.Parameters.AddWithValue("@Website", TextBox3.Text)
cmd.Parameters.AddWithValue("@Note", TextBox4.Text)
cmd.Parameters.AddWithValue("@Image", imgbytearray)
If DirectCast(cmd.ExecuteNonQuery(), Integer) > 0 Then
Return
End If

Catch ex As Exception
MessageBox.Show(ex.Message)
'Return

End Try
conn.Close()
cmd.Dispose()
conn.Dispose()

Catch ex As Exception
MessageBox.Show(ex.Message)
Return
End Try
GeneralRe: How to save an image in access Pin
Dave Kreskowiak2-Jun-09 4:44
mveDave Kreskowiak2-Jun-09 4:44 
GeneralRe: How to save an image in access Pin
Jon_Boy2-Jun-09 1:52
Jon_Boy2-Jun-09 1:52 
AnswerRe: How to save an image in access Pin
mindserve1-Jun-09 23:13
mindserve1-Jun-09 23:13 
GeneralRe: How to save an image in access Pin
mirzamujib2-Jun-09 0:58
mirzamujib2-Jun-09 0:58 
GeneralRe: How to save an image in access Pin
Tom Deketelaere2-Jun-09 1:09
professionalTom Deketelaere2-Jun-09 1:09 
GeneralRe: How to save an image in access Pin
mirzamujib2-Jun-09 2:00
mirzamujib2-Jun-09 2:00 
GeneralRe: How to save an image in access Pin
Tom Deketelaere2-Jun-09 2:10
professionalTom Deketelaere2-Jun-09 2:10 
GeneralRe: How to save an image in access Pin
mirzamujib2-Jun-09 4:03
mirzamujib2-Jun-09 4:03 
GeneralRe: How to save an image in access Pin
Tom Deketelaere2-Jun-09 7:37
professionalTom Deketelaere2-Jun-09 7:37 
GeneralRe: How to save an image in access Pin
mirzamujib2-Jun-09 20:55
mirzamujib2-Jun-09 20:55 
GeneralRe: How to save an image in access Pin
mirzamujib2-Jun-09 4:09
mirzamujib2-Jun-09 4:09 
AnswerRe: How to save an image in access Pin
mindserve2-Jun-09 2:47
mindserve2-Jun-09 2:47 
GeneralRe: How to save an image in access Pin
mirzamujib2-Jun-09 4:14
mirzamujib2-Jun-09 4:14 
AnswerRe: How to save an image in access Pin
mindserve2-Jun-09 3:18
mindserve2-Jun-09 3:18 
GeneralRe: How to save an image in access Pin
mirzamujib2-Jun-09 4:17
mirzamujib2-Jun-09 4:17 
GeneralRe: How to save an image in access Pin
mirzamujib2-Jun-09 20:51
mirzamujib2-Jun-09 20:51 
GeneralRe: How to save an image in access Pin
mirzamujib2-Jun-09 22:55
mirzamujib2-Jun-09 22:55 

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.