Quantcast

Re: sqlite3_prepare_v2

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite3_prepare_v2

D. Richard Hipp

On Dec 23, 2009, at 4:12 PM, Dr. Robert N. Cleaves wrote:

> Dear Sir:
>
> On startup, I get a message that the procedure entry point  
> sqlite3_prepare_v2 is missing from the dynamic link library  
> SQLite3.dll. How can I download the missing item?
>
> Thank you…

I'm guessing you are running windows.  Probably you have two or more  
applications installed that use SQLite.  (Candidates applications  
include Skype, Google Gears, Firefox, McAfee Antivirus, Adobe  
Acroread, Adobe Photoshop, iTunes, DropBox, and many others.)  
Probably when one of these applications was installing itself, it  
overwrote the system SQLite3.dll with an older version that does not  
support the sqlite3_prepare_v2() interface.  Then when one of the  
other applications that needs the new interface tries to run, it gets  
the older DLL that lacks the necessary entry point.

I beg and plead with application vendors to statically link against  
SQLite to avoid this kind of problem, but nobody listens to me about  
that....

I don't use windows myself and so I won't be much help in  
troubleshooting this.  But I have forwarded this reply to the SQLite  
mailing list where there are lots of windows users.  Perhaps someone  
there can explain what needs to be done....


>
> Dr. Robert N. Cleaves
> President
> Wilderness Conservancy
> and Project CARE
> www.wildcon.org
> [hidden email]
> (310) 472-2593
>
> I am using the Free version of SPAMfighter.
> We are a community of 6 million users fighting spam.
> SPAMfighter has removed 37 of my spam emails to date.
> The Professional version does not have this message.

D. Richard Hipp
[hidden email]



_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite3_prepare_v2

Kees Nuyt
On Wed, 23 Dec 2009 16:50:08 -0500, "D. Richard Hipp"
<[hidden email]> wrote:

>
>On Dec 23, 2009, at 4:12 PM, Dr. Robert N. Cleaves wrote:
>
>> Dear Sir:
>>
>> On startup, I get a message that the procedure entry point  
>> sqlite3_prepare_v2 is missing from the dynamic link library  
>> SQLite3.dll. How can I download the missing item?
>>
>> Thank you…
>
>I'm guessing you are running windows.  Probably you have two or more  
>applications installed that use SQLite.  (Candidates applications  
>include Skype, Google Gears, Firefox, McAfee Antivirus, Adobe  
>Acroread, Adobe Photoshop, iTunes, DropBox, and many others.)  
>Probably when one of these applications was installing itself, it  
>overwrote the system SQLite3.dll with an older version that does not  
>support the sqlite3_prepare_v2() interface.  Then when one of the  
>other applications that needs the new interface tries to run, it gets  
>the older DLL that lacks the necessary entry point.
>
>I beg and plead with application vendors to statically link against  
>SQLite to avoid this kind of problem, but nobody listens to me about  
>that....
>
>I don't use windows myself and so I won't be much help in  
>troubleshooting this.  


>But I have forwarded this reply to the SQLite  
>mailing list where there are lots of windows users.  Perhaps someone  
>there can explain what needs to be done....


Dear Robert,

Richards Hipps diagnosis is almost certainly correct.

My "plan de campagne" would be:

1) Use the search function in Windows Explorer to find all
occurrences of sqlite3.dll on your harddisk(s).

2) Make a note of the folder they reside in.

3) Download the current version of sqlite3.dll (zipped) from
http://www.sqlite.org/sqlitedll-3_6_21.zip 

4) Unzip or open the zip file, it contains the needed .dll

5) Replace sqlite3.dll in system folders, like C:\Windows\ ,
C:\Windows\System\ , C:\Windows\System32\ and the like, but
only if listed in step 2). Do not replace sqlite3.dll in
application folders yet, like C:\Program Files\ and
everything below that folder.

6) Reboot your computer, verify the error has disappeared.
If so: congratulations.

7) Only if the problem persists, replace all other
occurences of sqlite3.dll , in all other folders you listed
in 2).

The chance this action will introduce new incompatibilities
is small. Most applications will not notice the difference,
Richard Hipp and his team are very careful with upward
compatibility.

Software that doesn't work correctly can be reinstalled.

If that doesn't help, write your exact findings to the
[hidden email] mailing list. Let us know the
Operating System you use and which version it had, and the
version of the application which has problems.

Disclaimer: I can not take any responsibility for any damage
this repair may cause. If you are uncertain about it, you'd
better have a qualified system administrator look at your
computer.

>> Dr. Robert N. Cleaves
>> President
>> Wilderness Conservancy
>> and Project CARE
>> www.wildcon.org
>> [hidden email]
>> (310) 472-2593
>>
>
>D. Richard Hipp
>[hidden email]
--
  (  Kees Nuyt
  )
c[_]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite3_prepare_v2

Teg-3
In reply to this post by D. Richard Hipp

I statically link for exactly this reason. If I WAS going to dynamic
link though, I'd make my own DLL from the sources, give it a unique
name, link against it's import lib and keep it in the same folder as
my EXE.

C


Wednesday, December 23, 2009, 4:50:08 PM, you wrote:

DRH> On Dec 23, 2009, at 4:12 PM, Dr. Robert N. Cleaves wrote:

>> Dear Sir:
>>
>> On startup, I get a message that the procedure entry point  
>> sqlite3_prepare_v2 is missing from the dynamic link library  
>> SQLite3.dll. How can I download the missing item?
>>
>> Thank you…

DRH> I'm guessing you are running windows.  Probably you have two or more  
DRH> applications installed that use SQLite.  (Candidates applications  
DRH> include Skype, Google Gears, Firefox, McAfee Antivirus, Adobe  
DRH> Acroread, Adobe Photoshop, iTunes, DropBox, and many others.)  
DRH> Probably when one of these applications was installing itself, it  
DRH> overwrote the system SQLite3.dll with an older version that does not  
DRH> support the sqlite3_prepare_v2() interface.  Then when one of the  
DRH> other applications that needs the new interface tries to run, it gets
DRH> the older DLL that lacks the necessary entry point.

DRH> I beg and plead with application vendors to statically link against  
DRH> SQLite to avoid this kind of problem, but nobody listens to me about  
DRH> that....

DRH> I don't use windows myself and so I won't be much help in  
DRH> troubleshooting this.  But I have forwarded this reply to the SQLite  
DRH> mailing list where there are lots of windows users.  Perhaps someone  
DRH> there can explain what needs to be done....


>>
>> Dr. Robert N. Cleaves
>> President
>> Wilderness Conservancy
>> and Project CARE
>> www.wildcon.org
>> [hidden email]
>> (310) 472-2593
>>
>> I am using the Free version of SPAMfighter.
>> We are a community of 6 million users fighting spam.
>> SPAMfighter has removed 37 of my spam emails to date.
>> The Professional version does not have this message.

DRH> D. Richard Hipp
DRH> [hidden email]



DRH> _______________________________________________
DRH> sqlite-users mailing list
DRH> [hidden email]
DRH> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



--
Best regards,
 Teg                            mailto:[hidden email]

_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite3_prepare_v2

Nick Shaw-3
I'd suggest having your own sqlite3.dll in your own application's working folder, rather than relying on an existing version somewhere on the PC already which could be any version!

If you created your own DLL, why would you then want to statically link to it (defeating a lot of the point of a *dynamic* load library)?  That doesn't provide you with any back/forwards compatibility.  Why not dynamically load the sqlite3.dll and the required functions at runtime instead?  If the functions can't be found on the load, you would then be able to handle it gracefully and inform the user, rather than having the prompt of a procedure entry point error, which means nothing to non-programmer users.

From a C program, this is the kind of thing I'd do (example just loads the function sqlite3_libversion_number from sqlite3.dll - note that I've hand-coded this so it hasn't been checked for typos!):

//...
// include necessary windows headers for LoadLibrary() API etc.
#include <sqlite3.h> // for sqlite-specific typedefs/structures/etc
//...

typedef int (SQLITE_API * MYPROC)(void); // a typedef'd version of the function definition of sqlite3_libversion_number() prototype from sqlite3.h

static HANDLE HLib = NULL; // handle to sqlite3 library, once opened
static MYPROC MySqlite3LibVersion = NULL;// will contain a pointer to our imported sqlite3_libversion_number() function

BOOL LoadSqliteLibrary()
{
        BOOL Ret = TRUE;

        if (HLib != NULL)
        {
                // dynamically load sqlite3.dll
                HLib = LoadLibrary( "sqlite3.dll" );

                // if library loaded okay, get the required procedures' address pointers out
                if (HLib != NULL)
                {
                        // get pointer to sqlite3_libversion_number from the dll for our own use
                        MySqlite3LibVersion = GetProcAddress( HLib, "sqlite3_libversion_number" );

                        // if we couldn't find the required procedure's entry point...
                        If (MySqlite3Exec == NULL)
                        {
                                // procedure entry point may not exist in loaded library!
                                Ret = FALSE;
                                // free library on procedure load error, as not much use any more
                                FreeLibrary( HLib );
                                HLib = NULL;
                                // ... possibly inform user of the error at this point?
                        }
                }
                else
                {
                        // library failed to load - sqlite3.dll file may not exist
                        Ret = FALSE;
                        // ... possibly inform user of the error at this point?
                }
        }
        // else library is already loaded

        return (Ret);
}

//...
// As long as LoadSqliteLibrary() returns TRUE, you can now use MySqlite3LibVersion() to return the library version number.
//...

Thanks,
Nick.

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Teg
Sent: 24 December 2009 00:57
To: General Discussion of SQLite Database
Subject: Re: [sqlite] sqlite3_prepare_v2


I statically link for exactly this reason. If I WAS going to dynamic
link though, I'd make my own DLL from the sources, give it a unique
name, link against it's import lib and keep it in the same folder as
my EXE.

C


Wednesday, December 23, 2009, 4:50:08 PM, you wrote:

DRH> On Dec 23, 2009, at 4:12 PM, Dr. Robert N. Cleaves wrote:

>> Dear Sir:
>>
>> On startup, I get a message that the procedure entry point  
>> sqlite3_prepare_v2 is missing from the dynamic link library  
>> SQLite3.dll. How can I download the missing item?
>>
>> Thank you…

DRH> I'm guessing you are running windows.  Probably you have two or more  
DRH> applications installed that use SQLite.  (Candidates applications  
DRH> include Skype, Google Gears, Firefox, McAfee Antivirus, Adobe  
DRH> Acroread, Adobe Photoshop, iTunes, DropBox, and many others.)  
DRH> Probably when one of these applications was installing itself, it  
DRH> overwrote the system SQLite3.dll with an older version that does not  
DRH> support the sqlite3_prepare_v2() interface.  Then when one of the  
DRH> other applications that needs the new interface tries to run, it gets
DRH> the older DLL that lacks the necessary entry point.

DRH> I beg and plead with application vendors to statically link against  
DRH> SQLite to avoid this kind of problem, but nobody listens to me about  
DRH> that....

DRH> I don't use windows myself and so I won't be much help in  
DRH> troubleshooting this.  But I have forwarded this reply to the SQLite  
DRH> mailing list where there are lots of windows users.  Perhaps someone  
DRH> there can explain what needs to be done....


>>
>> Dr. Robert N. Cleaves
>> President
>> Wilderness Conservancy
>> and Project CARE
>> www.wildcon.org
>> [hidden email]
>> (310) 472-2593
>>
>> I am using the Free version of SPAMfighter.
>> We are a community of 6 million users fighting spam.
>> SPAMfighter has removed 37 of my spam emails to date.
>> The Professional version does not have this message.

DRH> D. Richard Hipp
DRH> [hidden email]



DRH> _______________________________________________
DRH> sqlite-users mailing list
DRH> [hidden email]
DRH> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



--
Best regards,
 Teg                            mailto:[hidden email]

_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite3_prepare_v2

Dan Kennedy-4

On Dec 24, 2009, at 5:46 PM, Nick Shaw wrote:

> I'd suggest having your own sqlite3.dll in your own application's  
> working folder, rather than relying on an existing version somewhere  
> on the PC already which could be any version!
>
> If you created your own DLL, why would you then want to statically  
> link to it (defeating a lot of the point of a *dynamic* load  
> library)?  That doesn't provide you with any back/forwards  
> compatibility.  Why not dynamically load the sqlite3.dll and the  
> required functions at runtime instead?  If the functions can't be  
> found on the load, you would then be able to handle it gracefully  
> and inform the user, rather than having the prompt of a procedure  
> entry point error, which means nothing to non-programmer users.

Yet if you compile sqlite3.c in statically, then there is
no chance at all that you will fail to find the required
functions. And it guarantees that your app always runs with
the same version that you tested with. Compiling SQLite in
statically will only add 250KB or thereabouts to your binary.

What are the advantages of using a DLL if you store it in
the application's folder and don't expect any apps other
than yours to use it?

_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite3_prepare_v2

Dr. Robert N. Cleaves
In reply to this post by Kees Nuyt
Thank you very much for your help. The problem was in iTUNES. I removed it and no more problem. I then downloaded a new free version and the problem was solved.

Dr. Robert N. Cleaves


-----Original Message-----
From: Kees Nuyt [mailto:[hidden email]]
Sent: Wednesday, December 23, 2009 3:19 PM
To: Dr. Robert N. Cleaves
Cc: [hidden email]
Subject: Re: [sqlite] sqlite3_prepare_v2

On Wed, 23 Dec 2009 16:50:08 -0500, "D. Richard Hipp"
<[hidden email]> wrote:

>
>On Dec 23, 2009, at 4:12 PM, Dr. Robert N. Cleaves wrote:
>
>> Dear Sir:
>>
>> On startup, I get a message that the procedure entry point  
>> sqlite3_prepare_v2 is missing from the dynamic link library  
>> SQLite3.dll. How can I download the missing item?
>>
>> Thank you…
>
>I'm guessing you are running windows.  Probably you have two or more  
>applications installed that use SQLite.  (Candidates applications  
>include Skype, Google Gears, Firefox, McAfee Antivirus, Adobe  
>Acroread, Adobe Photoshop, iTunes, DropBox, and many others.)  
>Probably when one of these applications was installing itself, it  
>overwrote the system SQLite3.dll with an older version that does not  
>support the sqlite3_prepare_v2() interface.  Then when one of the  
>other applications that needs the new interface tries to run, it gets  
>the older DLL that lacks the necessary entry point.
>
>I beg and plead with application vendors to statically link against  
>SQLite to avoid this kind of problem, but nobody listens to me about  
>that....
>
>I don't use windows myself and so I won't be much help in  
>troubleshooting this.  


>But I have forwarded this reply to the SQLite  
>mailing list where there are lots of windows users.  Perhaps someone  
>there can explain what needs to be done....


Dear Robert,

Richards Hipps diagnosis is almost certainly correct.

My "plan de campagne" would be:

1) Use the search function in Windows Explorer to find all
occurrences of sqlite3.dll on your harddisk(s).

2) Make a note of the folder they reside in.

3) Download the current version of sqlite3.dll (zipped) from
http://www.sqlite.org/sqlitedll-3_6_21.zip 

4) Unzip or open the zip file, it contains the needed .dll

5) Replace sqlite3.dll in system folders, like C:\Windows\ ,
C:\Windows\System\ , C:\Windows\System32\ and the like, but
only if listed in step 2). Do not replace sqlite3.dll in
application folders yet, like C:\Program Files\ and
everything below that folder.

6) Reboot your computer, verify the error has disappeared.
If so: congratulations.

7) Only if the problem persists, replace all other
occurences of sqlite3.dll , in all other folders you listed
in 2).

The chance this action will introduce new incompatibilities
is small. Most applications will not notice the difference,
Richard Hipp and his team are very careful with upward
compatibility.

Software that doesn't work correctly can be reinstalled.

If that doesn't help, write your exact findings to the
[hidden email] mailing list. Let us know the
Operating System you use and which version it had, and the
version of the application which has problems.

Disclaimer: I can not take any responsibility for any damage
this repair may cause. If you are uncertain about it, you'd
better have a qualified system administrator look at your
computer.

>> Dr. Robert N. Cleaves
>> President
>> Wilderness Conservancy
>> and Project CARE
>> www.wildcon.org
>> [hidden email]
>> (310) 472-2593
>>
>
>D. Richard Hipp
>[hidden email]
--
  (  Kees Nuyt
  )
c[_]


--
I am using the free version of SPAMfighter.
We are a community of 6 million users fighting spam.
SPAMfighter has removed 37 of my spam emails to date.
Get the free SPAMfighter here: http://www.spamfighter.com/len

The Professional version does not have this message


_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sqlite3_prepare_v2

Max Vlasov
It's an interesting topic. Tried to search the web, and at least two
well-known programs, Picasa and iTunes probably expects sqlite3.dll to be
located somewhere in a shared place (probably system32 folder) and some
other software silently replaced this dll with its own copy having this
entry (sqlite3_prepare_v2) absent so after that both programs refused to
start.

iTunes
http://www.seasonsecurity.com/how-do-i-download-sqlite3dll-89859
Picasa
http://www.mail-archive.com/sqlite-users@.../msg46025.html

First, I'd pass D. Richard Hipp's comment about statical linking to these
vendors as well :) But also this may also comes from the fact that all
sqlite3.dll I saw had no windows version resource, but only version
reporting through the corresponding function. It's not a problem when one
writes his own installer, but as I suppose, all well-known tools for
creating installers like InstallShield, relies mostly on resource version
comparision in their scripts, so can it be that doing all the things by
default, a software developer ends with a script that founds no version
information in both versions (in the installer, and in the Windows folder)
and prefers to "upgrade" anyway. Also is it hard to compile current version
of sqlite3.c to dll with version information in Windows format without
necessity to manually duplicate this information?

Max

On Fri, Dec 25, 2009 at 2:26 AM, Dr. Robert N. Cleaves <[hidden email]>wrote:

> Thank you very much for your help. The problem was in iTUNES. I removed it
> and no more problem. I then downloaded a new free version and the problem
> was solved.
>
> Dr. Robert N. Cleaves
>
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Loading...