[SqueakDBX] SqueakDBX Error(Cannot use integer as pointer)
Mariano Martinez Peck
marianopeck at gmail.com
Tue Jul 7 00:15:41 UTC 2009
Sorry, I copied and paste your code but I didn't modify it haaha
| cs c |
cs _ DBXConnectionSettings host: 'localhost' port: '3306'
database: 'test' userName: 'root' userPassword: 'test'.
c _ DBXConnection platform: DBXSqlitePlatform new settings: cs.
c connect.
c open.
c close.
c disconnect.
I changed port: 3306 to port: '3306'
Now I also see that example is wrong. If you want to use Sqlite, you should
do someting like this:
BXConnectionSettings
host: '/home/mariano/sqlite/'
port: ''
database: 'sodbxtest.db'
userName: ''
userPassword: ''
See DBXSqliteFacility>>createConnection
for an example
'3306' is for MySQL in which case, an example would be:
DBXConnectionSettings
host: '127.0.0.1'
port: '3306'
database: 'sodbxtest'
userName: 'sodbxtest'
userPassword: 'sodbxtest'
Cheers,
Mariano
On Mon, Jul 6, 2009 at 9:11 PM, Mariano Martinez Peck <marianopeck at gmail.com
> wrote:
> Chun: Hi! It is wrong the port, it must be a string. Example:
>
> | cs c |
> cs _ DBXConnectionSettings host: 'localhost' port: 3306
> database: 'test' userName: 'root' userPassword: 'test'.
> c _ DBXConnection platform: DBXSqlitePlatform new settings: cs.
> c connect.
> c open.
> c close.
> c disconnect.
>
> In which OS are you? If windows, you must use OpenDBX 1.4.1 (not 1.4)
> because there was a problem fixed there with sqlite in windows.
>
> You can see examples in subclasses of from DBXBackendFacility method
> createConnection. Also in the wiki:
> http://wiki.squeak.org/squeak/6067
>
> Tell me if it works!
>
> Cheers,
>
> Mariano
>
>
> On Mon, Jul 6, 2009 at 8:51 PM, "S.J.Chun" <chunsj at embian.com> wrote:
>
>> Hi,
>>
>> I've tested with squeak 3.10.2 with ffi and squeakdbx 1.0 but encountered
>> following error:
>>
>> Cannot use integer as pointer
>>
>> at apiInitialize: handle backend: backend host: host port: port
>> which seems to related with FFI.
>>
>> My test code is;
>>
>> | cs c |
>> cs _ DBXConnectionSettings host: 'localhost' port: 3306
>> database: 'test' userName: 'root' userPassword: 'test'.
>> c _ DBXConnection platform: DBXSqlitePlatform new settings: cs.
>> c connect.
>> c open.
>> c close.
>> c disconnect.
>> _______________________________________________
>> SqueakDBX mailing list
>> SqueakDBX at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeakdbx/attachments/20090706/1d39b8dc/attachment.htm
More information about the SqueakDBX
mailing list