Click here to Skip to main content
15,920,603 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Debug levels Pin
Dave Kreskowiak9-Jul-04 4:04
mveDave Kreskowiak9-Jul-04 4:04 
GeneralRe: Debug levels Pin
Boniolopez9-Jul-04 4:28
Boniolopez9-Jul-04 4:28 
GeneralRe: Debug levels Pin
Dave Kreskowiak9-Jul-04 5:50
mveDave Kreskowiak9-Jul-04 5:50 
Generalgive vb code Pin
nazerudeen9-Jul-04 2:15
nazerudeen9-Jul-04 2:15 
GeneralRe: give vb code Pin
Dave Kreskowiak9-Jul-04 3:45
mveDave Kreskowiak9-Jul-04 3:45 
Generalgive vb code Pin
nazerudeen9-Jul-04 1:54
nazerudeen9-Jul-04 1:54 
GeneralRe: give vb code Pin
Dave Kreskowiak9-Jul-04 3:42
mveDave Kreskowiak9-Jul-04 3:42 
GeneralPassing Parameter value from VB.net to MySql Pin
Member 12217979-Jul-04 1:39
Member 12217979-Jul-04 1:39 
Hi,
I am trying to pass parameter value to ODBCCommand object.
but it is not assigning, the null value is gets stored. i m using following code,

Private Sub cmdsave_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdsave.Click
Dim command As New OdbcCommand
Dim str As String

Dim photo() As Byte = GetPhoto(txtpath.Text)
str= insert into emp(id, name, photo) values (1,@name,@photo)
command = New OdbcCommand(str, con.cn) ' con.cn is connection object
command.Parameters.Add("@name", OdbcType.VarChar, 20).Value = "sagar"
command.Parameters.Add("@photo", OdbcType.Image, photo.Length).Value = photo
command.ExecuteNonQuery()
msgbox "saved"
End Sub

Public Shared Function GetPhoto(ByVal filePath As String) As Byte()
Dim fs As FileStream = New FileStream(filePath, FileMode.Open, FileAccess.Read)
Dim br As BinaryReader = New BinaryReader(fs)
Dim photo As Byte() = br.ReadBytes(fs.Length)
br.Close()
fs.Close()
Return photo
End Function

Please can anyone help me?

Regards
Programmer2004
GeneralRe: Passing Parameter value from VB.net to MySql Pin
The Man from U.N.C.L.E.19-Jul-04 7:24
The Man from U.N.C.L.E.19-Jul-04 7:24 
GeneralRe: Passing Parameter value from VB.net to MySql Pin
Member 122179719-Jul-04 16:26
Member 122179719-Jul-04 16:26 
QuestionProblems calling form from windows service? Pin
mythinky8-Jul-04 23:18
mythinky8-Jul-04 23:18 
GeneralParallel port vs VB.net vs ASP.net Pin
marcus_gsh8-Jul-04 20:54
sussmarcus_gsh8-Jul-04 20:54 
GeneralRe: Parallel port vs VB.net vs ASP.net Pin
Dave Kreskowiak9-Jul-04 2:37
mveDave Kreskowiak9-Jul-04 2:37 
GeneralIE Explorer Toolbar - like google Pin
Claudio Chiappetta8-Jul-04 17:50
Claudio Chiappetta8-Jul-04 17:50 
GeneralRe: IE Explorer Toolbar - like google Pin
Dave Kreskowiak9-Jul-04 5:35
mveDave Kreskowiak9-Jul-04 5:35 
Generalsaving the state of a textbox in Windows application Pin
Anonymous8-Jul-04 10:41
Anonymous8-Jul-04 10:41 
GeneralRe: saving the state of a textbox in Windows application Pin
Dave Kreskowiak8-Jul-04 11:15
mveDave Kreskowiak8-Jul-04 11:15 
GeneralRe: saving the state of a textbox in Windows application Pin
Anonymous9-Jul-04 3:22
Anonymous9-Jul-04 3:22 
GeneralRe: saving the state of a textbox in Windows application Pin
beowulfagate8-Jul-04 13:06
beowulfagate8-Jul-04 13:06 
GeneralRe: saving the state of a textbox in Windows application Pin
Anonymous9-Jul-04 4:15
Anonymous9-Jul-04 4:15 
GeneralRe: saving the state of a textbox in Windows application Pin
Anonymous9-Jul-04 10:27
Anonymous9-Jul-04 10:27 
GeneralRe: saving the state of a textbox in Windows application Pin
beowulfagate9-Jul-04 14:05
beowulfagate9-Jul-04 14:05 
GeneralRe: saving the state of a textbox in Windows application Pin
Anonymous10-Jul-04 17:12
Anonymous10-Jul-04 17:12 
GeneralFinding The Local Domain Pin
bward19728-Jul-04 5:39
bward19728-Jul-04 5:39 
GeneralRe: Finding The Local Domain Pin
Dave Kreskowiak8-Jul-04 6:45
mveDave Kreskowiak8-Jul-04 6:45 

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.