Hi,
I have followed the short tutorials[1][2] on SQLite and Pharo and my connection is working properly. But I miss some liveliness on how interact with data base, particularly after seeing the video from Doru at [3], where near to min 38 he shows a connection with a Posgresql data base which after ran on the playground results in a nice vire with a tab for putting the SQL code and another for inspecting the results in a table format, even for adding data live. Is this functionality only available on Postgres or can also be enabled on a connection for SQLite and if yes, how can it be done? [1] http://lists.gforge.inria.fr/pipermail/pharo-project/2010-October/033564.html [2] http://smalltalkhub.com/#!/~PharoExtras/NBSQLite3 [3] https://vimeo.com/97315968 Thanks, Offray |
Hi,
I'm trying my queries in a more static form. My idea is to get proper insertion of Smalltalk object values on a SQLite database, but when I try: ~~~ db execute: 'INSERT INTO BLOGPOSTS values (?, "Hola mundo!");' with: #(2) ~~~ I get: error message: "Error: Unable to resolve external type: sqlite_int64" So seems that the number is trying to talk with the 64 bits of Sqlite instead of the 32 bits one which is in the same place that the image. Any way to solve this? Thanks, Offray On 18/10/15 10:48, Offray Vladimir Luna Cárdenas wrote: > Hi, > > I have followed the short tutorials[1][2] on SQLite and Pharo and my > connection is working properly. But I miss some liveliness on how > interact with data base, particularly after seeing the video from Doru > at [3], where near to min 38 he shows a connection with a Posgresql > data base which after ran on the playground results in a nice vire > with a tab for putting the SQL code and another for inspecting the > results in a table format, even for adding data live. Is this > functionality only available on Postgres or can also be enabled on a > connection for SQLite and if yes, how can it be done? > > [1] > http://lists.gforge.inria.fr/pipermail/pharo-project/2010-October/033564.html > [2] http://smalltalkhub.com/#!/~PharoExtras/NBSQLite3 > [3] https://vimeo.com/97315968 > > Thanks, > > Offray > > |
Hi again,
Solved! Torsten advice was: ~~~ Change apiBindInteger: aStatement atColumn: aColumn with: anInteger to use an integer in the NB call "int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite_int64)" <primitive: #primitiveNativeCall module: #NativeBoostPlugin error: errorCode> ^ self nbCall: #(int sqlite3_bind_int64 (sqlite3_stmt aStatement, int aColumn, int anInteger)) module: self library ~~~ And now works. Thanks a lot!!! Now I have another problem. If I ran http://ws.stfx.eu/1VPMHQXNL35N the first insert command generates a new row in the database but the second one doesn't, as is shown by querying the database from sqlite3 command client. What I'm missing? Cheers, Offray On 18/10/15 13:22, Offray Vladimir Luna
Cárdenas wrote:
Hi, |
Free forum by Nabble | Edit this page |