Mysql help

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2007
Posts: 2
Reputation: eallnepjcc is an unknown quantity at this point 
Solved Threads: 0
eallnepjcc eallnepjcc is offline Offline
Newbie Poster

Mysql help

 
0
  #1
Oct 19th, 2007
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Generate_Script_save() <--- sub that generates the instert into code
'Dim mangosSQL As MySqlConnection
Dim mangosSQL As New MySqlConnection
Dim mangosSQLCommand As New MySqlCommand

mangosSQL.ConnectionString = myConnString
mangosSQLCommand.Connection = mangosSQL
mangosSQLCommand.CommandText = txtScript.Text
Try

mangosSQL.Open()
mangosSQLCommand.ExecuteNonQuery()
Catch MyError As Exception
MsgBox(MyError.Message, MsgBoxStyle.Critical, "Error writing to DB")
Exit Sub
Finally
mangosSQL.Close()
mangosSQL.Dispose()
End Try
End Sub

when ever i run my code i get
The command test property has not been initialized

could any one please give me a reason why this could be happening
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 2
Reputation: eallnepjcc is an unknown quantity at this point 
Solved Threads: 0
eallnepjcc eallnepjcc is offline Offline
Newbie Poster

Re: Mysql help

 
0
  #2
Oct 19th, 2007
Ok no need to reply, the command text was going to empty text box for somereason was not being filled in by the code like it was saposed to be but i fixed it thank any ways lol. Short post huh
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC