[Pharo-users] Error: Unable to resolve external type: sqlite_int64 (It was Re: Live interaction with SQLite data from Pharo)

Offray Vladimir Luna Cárdenas offray at riseup.net
Sun Oct 18 15:39:43 EDT 2015


Hi again,

Solved! Torsten advice was:

~~~
Change apiBindInteger: aStatement atColumn: aColumn with: anInteger to 
use an integer in the NB call
1:41 <https://pharoproject.slack.com/archives/general/p1445193666002305> 
apiBindInteger: aStatement atColumn: aColumn with: anInteger
     "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,
>
> 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
>>
>>
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20151018/4ad37be1/attachment.html>


More information about the Pharo-users mailing list