MySQL Driver
Daniel Salama
dsalama at user.net
Sun Apr 10 16:52:14 UTC 2005
I'm trying to execute an UPDATE SQL statement and every time I run it,
I get an exception. Is there a specific way of doing this?
Socket initializeNetwork.
spec := (JdmConnectionSpec new initialize
user: 'master'; password: 'secret';
host: (NetNameResolver addressForName: 'localhost');
database: 'dcm'; port: 3306).
connection := JdmConnection on: spec.
statement := connection createStatement.
nextCustomerNo := 1.
updateSQL := 'update tests set next = ', (nextCustomerNo asString), '
where sequence = ''CustomerNo'''.
statement executeQuery: updateSQL.
This generates: "Error: subscript is out of bounds: 2" exception.
Any ideas anyone?
Thanks,
Daniel
More information about the Squeak-dev
mailing list
|