Page 1 of 1

mysql checksum

Posted: Saturday 26th September 2020 9:07am
by bill-lancaster
I want to check if a record has changed in a myslq database. I'm interested only in changes made while the record is displayed.
I can do:

Code: Select all

hResult = hConn.Exec("CHECKSUM TABLE test")
but hResult!checksum is null.
Any advice would be welcome

Re: mysql checksum

Posted: Saturday 26th September 2020 3:08pm
by Matthew-Collins
Hi Bill,

I got checksum table working in gambas, see below:
Public Sub Button1_Click()

  Dim hConn As Connection = Connections["Connection1"]
  hConn.Open

  Dim hresult As Result = hconn.Exec("CHECKSUM TABLE test")
  Print hresult!Checksum

End
Note case sensitive i.e ...!Checksum

Also try in terminal:
sudo mysql
connect myDatabase
CHECKSUM TABLE test
+----------+-----------+
| Table | Checksum |
+----------+-----------+
| myDatabase.test | 736424448 |
+----------+-----------+
1 row in set (0.00 sec)

Re: mysql checksum

Posted: Saturday 26th September 2020 4:31pm
by bill-lancaster
Thanks a lot Mathew, I'd misspelt the table name!
All is fine,
Thanks again