'//THIS IS FOR MSSQL
dim db as new MSSQLServerDatabase
'//SET NEEDED PARAMETER
db.Host = "(local)"
db.DatabaseName = "raf"
db.UserName = "sa"
db.Password = "Pastilan123"
'//OPENING NOW
if db.connect then
'//use this to start the update/insert/delete
db.SQLExecute("START TRANSACTION")
'//
'//to inform datbase to save immediately
db.SQLExecute("AUTO COMMIT")
'//for transaction
db.SQLExecute("BEGIN TRANSACTION")
db.SQLExecute("UPDATE tblCustomer SET Firstname = '" + txtFname.text + "', lastname = '" + txtLname.text + "', Age= " + txtAge.text + ", Gender = '" + txtGender.text + "', Birthdate= '" + txtBdate.text + "' Where ID ="+ txtid.Text)
'// record physically
db.commit
'done SAVING
END IF
Please help me to resolve the rs.Update issue. Nothing is happening in the database after rs.Update
Dim db As New MySQLCommunityServer
db.Host = “localhost”
db.Port = 3306
db.DatabaseName = “new”
db.UserName = “root”
db.Password = “admin”
If db.Connect Then
Dim d As New Date
Dim ps As PreparedSQLStatement=db.Prepare("SELECT * FROM repgen WHERE dates = ? ")
ps.BindType(0, MySQLPreparedStatement.MYSQL_TYPE_STRING)
ps.Bind(0,str(d.SQLDate))
Dim rs As RecordSet = ps.SQLSelect
MsgBox(str(rs.Field(“dates”).StringValue))
If rs <> Nil Then
rs.Edit
rs.Field(“ev1”).StringValue =“2”
MsgBox(rs.Field(“ev1”).StringValue)
rs.Update
db.Commit
Else
If db.Error Then MsgBox(db.ErrorMessage)
End If
Else
If db.Error Then MsgBox(db.ErrorMessage)
End If
this is my code . I’m getting the values in the MsgBox but its not getting updated in the database .