Now this is insane. With no changes to the server or anywhere else in my address book program, I just rearranged the code and suddenly the old method without ' ' works. When I removed the ' ' last time, I must have had some other syntax problem (but there were no errors). I have given up trying to figure out what I had done wrong 5 hours ago along with how I could get a rs = Nil without error. Anyway, the method now updates the records as I have been wanting to since yesterday, while the PS version of the method still is not updating the records.
Rather than taking this victory with a ice cold Corona and a tube of Pringles, of course I am now fixated on why this works
Dim rs As RecordSet = db.SQLSelect("SELECT * FROM contact_table WHERE idContact = " + RecordID.Text + ";")
but this does not
Dim ps As PreparedSQLStatement = db.Prepare("SELECT * FROM contact_table WHERE idContact = ?;") ps.BindType(0, MySQLPreparedStatement.MYSQL_TYPE_DOUBLE) ps.Bind(0, val(RecordID.Text)) Dim rs As RecordSet = ps.SQLSelect
nor does this work
Dim ps As PreparedSQLStatement = db.Prepare("SELECT * FROM contact_table WHERE idContact = ?;") ps.BindType(0, MySQLPreparedStatement.MYSQL_TYPE_STRING) ps.Bind(0, RecordID.Text) Dim rs As RecordSet = ps.SQLSelect
The rest of the method code being identical.
I was thinking the TYPE_DOUBLE could be screwing something up so I tried STRING, which is what the top one is doing, but as I mentioned, it doesn't update either. The strange thing is all 3 snippets above give rs identical record contents, but the rs.Edit and rs.Update methods are only working on the top one. I can't get rs.Edit and rs.Update methods to work with the PS style recordset.
I really like this concept of Prepared Statement so I am working hard trying to get the PS version to work so that I can use it with confidence in the future. That and I am a glutton for punishment.