MySQL Driver
Daniel Salama
dsalama at user.net
Sun Apr 10 23:13:50 UTC 2005
In addition, I am able to insert, delete, and select using the exact
same code with no problems. I just can't update. Any clues?
Thanks,
Daniel
On Apr 10, 2005, at 12:52 PM, Daniel Salama wrote:
> 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
|