Don't want to dampen your enthusiasm for this route but..... why do you
think there are so many VB wrappers for SQLite?

It's because you can't use the SQLite DLL directly from VB - some functions
will work but the essential ones won't.  It's because the DLL returns things
like pointers to arrays of pointers which is not very groovy in VB (in fact,
you would have to resort to some OS calls to unravel that).

Use one of the wrappers.

Steve






-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
rg]On Behalf Of Gregory Letellier
Sent: 27 July 2005 11:17
To: sqlite-users@sqlite.org
Subject: Re: AW: [sqlite] VB6 question


Ok Thank's for your help i will trying this !!!

[EMAIL PROTECTED] a écrit :

>Hi,
>
>unfortunately this has to do with the C calling convention used by
sqlite3.dll. By default DLLs compiled with C have the cdecl calling
convention, but VB only supports the stdcall calling convention.
>
>You must recompile sqlite using MS Visual C++ or other compiler and switch
the default calling convention from cdecl to stdcall in the compiler/linker
settings.
>
>HTH
>Michael
>
>
>
>>hello i'm trying to open a database with VB6 without wrapper
>>
>>i'm using sqlite3.dll
>>
>>and it's my code :
>>
>>Option Explicit
>>Private Declare Function sqlite3_open Lib "sqlite3.dll" (ByVal filename
>>As String, ByRef dbHandle As Long) As Long
>>Private Declare Function sqlite3_open16 Lib "sqlite3.dll" (ByVal
>>filename As String, ByRef dbHandle As Long) As Long
>>Private Declare Sub sqlite3_close Lib "sqlite3.dll" (ByVal DB_Handle As
>>Long)
>>
>>Private Sub Form_Load()
>>   Dim lRet As Long
>>   Dim lDbHandle As Long
>>   Dim sFilename As String
>>
>>   sFilename = "c:\toto.db"
>>   sqlite3_open sFilename, lDbHandle
>>   MsgBox ("lRet=" & lRet)
>>   MsgBox ("ldbhandle=" & lDbHandle)
>>   sqlite3_close (lDbHandle)
>>End Sub
>>
>>when i launch it, i've an error 49 : Bad DLL calling convention
>>
>>anyone can help me ? where is my fault ?
>>
>>thx
>>Gregory Letellier
>>
>>
>>
>>
>
>
>
>



Reply via email to