mysql checksum

Post your Gambas programming questions here.
Post Reply
bill-lancaster
Posts: 190
Joined: Tuesday 26th September 2017 3:17pm
Location: NW England

mysql checksum

Post 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
User avatar
Matthew-Collins
Posts: 12
Joined: Wednesday 21st September 2016 7:59pm
Location: Guernsey, Channel Islands

Re: mysql checksum

Post 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)
Cheers
Matt
bill-lancaster
Posts: 190
Joined: Tuesday 26th September 2017 3:17pm
Location: NW England

Re: mysql checksum

Post by bill-lancaster »

Thanks a lot Mathew, I'd misspelt the table name!
All is fine,
Thanks again
Post Reply