idContact is the integer PK for the address book table. There is only the one schema (other than sys) on the server and contact_table is the only table in the schema. There are no other mySQL servers running on the network or on my workstations (I even net stopped the local instance of mySQL80).
Same result removing the ' ' I even tried just putting an integer in the line regardless of record and still rs is nil which doesn't make sense. For this I used str(INT) and just sticking the number of course gave me an expected text literally error.
I didn't bother with a prepared statement on this since it is only the 1, supposedly simple element. It should just work. Actually it should just work with or without the ' surrounding the PK integer value.
Jeff, yeah, if I need to do a read/write to the db, I connect, do the read write and then close. There is only 1 query per method at the moment. I made Connectdb, add, edit and populate all different methods (Connectdb is global) while I am learning xojo and mySQL. Add, edit and populate all call Connectdb and end with db.Close. Add and populate get rs no problem, edit is giving me fits.
I just tried with and without ' around the PK value and still rs is nil. This is baffling, it should just work. I even broke out the SQL statement to a variable so I can check the statement value in the debug window and it sure looks like it is formed correctly.
This really isn't rocket science. Of all the xojo stuff, this is darn straight forward and it just isn't working in my edit method. I will keep plugging away though. Usually I just keep trying different stuff until I stumble across a fix. It has to be something really dumb and I am just to newb to see it.
I will go with a prepared statement and see if using str(INT) or str(RecordIDString) in the sql string variable is just making it choke for some unknown reason (since this has been working fine in my other methods).