Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help with my error
#8
Ah okay, I simply overlooked that! Sorry!

Hmm.

Well, with your current code, you are creating an adapter and you are sending in your Command Text and Connection variables via the parameters. However, I believe that this error is occurring because you do not actually have a MySqlCommand variable. Try revising your code so it contains a MySqlCommand variable (And be sure to link it to the connection), as such:

[code2=vbnet]Dim commandText As String = "Update personalinfo, schoolinfo set sno = '" & txtSno.Text & "', lastname = '" & txtLastName.Text & "', middlename = '" & txtMiddleName.Text & "', gender = '" & cmbGender.Text & "', dateofbirth = '" & txtBirthday.Text & "', school = '" & txtCollege.Text & "', course = '" & cmbCourse.Text & "', department = '" & txtDepartment.Text & "', dateenrolled = '" & txtEnrolled.Text & "', yeargraduated = '" & txtGraduated.Text & "', where no = '" & txtSno.Text & "'"

Dim MySQLConn As MySqlConnection = New MySqlConnection
Dim MySQLComm As MySqlCommand = New MySqlCommand(commandText, MySQLConn)
Dim da As MySqlDataAdapter
Dim ds As DataSet = New DataSet("newDataSet")

da = New MySqlDataAdapter(MySQLComm)[/code2]

This should resolve your problem. I have never actually tried connecting to a MySQL Server using the method that you are using, so I apologize if I am incorrect on the matter.
My Blog | My Setup | My Videos | Have a wonderful day.


Messages In This Thread
help with my error - by jochen29 - 09-08-2012, 04:47 PM
Re: help with my error - by jochen29 - 09-08-2012, 08:04 PM
Re: help with my error - by jochen29 - 09-08-2012, 09:47 PM
Re: help with my error - by jochen29 - 09-09-2012, 12:44 AM
Re: help with my error - by brandonio21_phpbb3_import2 - 09-09-2012, 10:55 AM
Re: help with my error - by manishshrestha60 - 09-10-2012, 05:52 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  TwitterAPIException - Error TwitterVB Crammer 3 14,444 10-14-2012, 09:06 PM
Last Post: brandonio21

Forum Jump:


Users browsing this thread: 1 Guest(s)