Re: I must be tarded.. please help
Ok how would add a row and update the db with the following code? The company table has three fields: An autoincrementing primary key, companyName, and otherOffices. I'm sure seeing how it's done will help permeate the notion in my brain.
Try
conn.Open()
Label1.Text = "Connection Opened Successfully"
Dim myCommand As New MySqlCommand()
Dim myAdapter As New MySqlDataAdapter()
Dim myData As New DataTable()
Dim SQL As String
SQL = "select * from company"
myCommand.Connection = conn
myCommand.CommandText = SQL
myAdapter.SelectCommand = myCommand
myAdapter.Fill(myData)
dim companyName as string = "Whatever INC."
dim otherOffices as Boolean = false
conn.Close()
Catch myerror As MySqlException
Label1.Text = "Error Connecting to Database: " & myerror.Message
Finally
conn.Dispose()
End Try
Subject
Written By
Posted
February 17, 2005 09:21AM
February 17, 2005 11:38AM
Re: I must be tarded.. please help
February 17, 2005 01:43PM
February 17, 2005 02:51PM
February 18, 2005 09:23AM
February 18, 2005 10:37AM
February 18, 2005 10:56AM
February 18, 2005 11:50AM
February 18, 2005 04:02PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.