[sqlite] Create Read-only Database

2010-10-09 Thread Joshua Grauman
I have a database that I want to be only read-only. I read in the 
optimization FAQ that this will make sqlite not create a journal and so 
run faster. I changed the permissions of my database file in Linux 
(removed the write permission), and sqlite was still able to create a new 
table. Since this file should never be written I also want to get an error 
if it is by some fault in a querry I write. So any ideas about how to make 
this entire database read-only? Is there a way to do this in sqlite 
itself? Thanks!

Josh
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] RTREE still uses float

2010-10-09 Thread Andrew Davison
Is it intentional that RTREE code still uses 'float' types?

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Confitional IF in triggers

2010-10-09 Thread Russell A
Thanks Igor - that's very helpful.

--- On Sun, 10/10/10, Igor Tandetnik  wrote:

From: Igor Tandetnik 
Subject: Re: [sqlite] Confitional IF in triggers
To: sqlite-users@sqlite.org
Received: Sunday, 10 October, 2010, 2:46 AM

Russell A  wrote:
> Hi Igor
> I'm converting an Interbase DB for use in a smaller application, so there are 
> many different examples.
> 
> I've included one particular example below, where I have converted a single 
> Interbase trigger (which used IF statements), into 4
> separate SQLite triggers. 
> Any advice appreciated.Russell.
> /* Trigger: TEXTLISTS_B4DEL */
> CREATE TRIGGER TEXTLISTS_B4DEL_genericsinfo BEFORE DELETE ON TEXTLISTS
> when (old.listtype in ('W', 'C')) and
> (select TextList_id from genericsinfo where TextList_id = old.textlist_id 
> Limit 1) is not null
> begin
>  Select Raise(Fail, 'DEPENDANCYERROR');
> end;

Something like this, perhaps:

CREATE TRIGGER TEXTLISTS_B4DEL_genericsinfo BEFORE DELETE ON TEXTLISTS
begin
  select raise(FAIL, 'DEPENDANCYERROR')
  where old.listtype in ('W', 'C') and exists
    (select 1 from genericsinfo where TextList_id = old.textlist_id);

  select raise(FAIL, 'DEPENDANCYERROR')
  where old.listtype = 'L' and exists
    (select 1 from PRODUCTS where LOCATION = old.identifier);

  select raise(FAIL, 'DEPENDANCYERROR')
  where old.listtype = 'PT' and exists
    (select 1 from PRODUCTS where PRODTYPE = old.identifier);

  select raise(FAIL, 'DEPENDANCYERROR')
  where old.listtype = 'PF' and exists
    (select 1 from PRODUCTS where PROD_FORM = old.identifier);
end;

You can also combine the four select statements into one statement, by ORing 
all WHERE conditions, or by doing something like this:

select raise(FAIL, 'DEPENDANCYERROR')
where case
    when old.listtype in ('W', 'C')
        then exists (select 1 from genericsinfo where TextList_id = 
old.textlist_id)
    when old.listtype = 'L'
        then exists (select 1 from PRODUCTS where LOCATION = old.identifier)
    when old.listtype = 'PT'
        then exists (select 1 from PRODUCTS where PRODTYPE = old.identifier)
    when old.listtype = 'PF'
        then exists (select 1 from PRODUCTS where PROD_FORM = old.identifier)
end;

-- 
Igor Tandetnik

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



  
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] composite foreign key

2010-10-09 Thread TP
Hi,

I am learning SQL.
The following lines do not yield any error in SQLite.
However, the foreign key in table "ref_foo" has four columns, and references 
table "foo" which has only 3 columns. Why is it possible?
This is just a dummy example to understand what happens with composite 
foreign keys.

Thanks in advance,

Julien

PRAGMA foreign_keys = ON;
CREATE TABLE foo ( id_foo1 INTEGER NOT NULL
, id_foo2 INTEGER NOT NULL
, id_foo3 INTEGER NOT NULL
, PRIMARY KEY ( id_foo1, id_foo2, id_foo3 ) );

CREATE TABLE ref_foo (
  id_reffoo INTEGER NOT NULL
  , id_foo1 INTEGER NOT NULL
  , id_foo2 INTEGER NOT NULL
  , id_foo3 INTEGER NOT NULL
  , PRIMARY KEY ( id_reffoo, id_foo1 )
  , FOREIGN KEY ( id_reffoo, id_foo1, id_foo2, id_foo3 ) REFERENCES foo ON 
UPDATE CASCADE ON DELETE CASCADE
);

-- 
python -c "print ''.join([chr(154 - ord(c)) for c in '*9(9&(18%.\
9&1+,\'Z4(55l4('])"

"When a distinguished but elderly scientist states that something is
possible, he is almost certainly right. When he states that something is
impossible, he is very probably wrong." (first law of AC Clarke)

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Run Time Error #1 in VS2008

2010-10-09 Thread kevin
I am working on a project in VS2008 and I am including the sqlite3 code
directly (compared to in the past using wrappers).  The program is working
great  (accessing DB, using calls, etc) but I have hit a peculiar issue
during runtime.  I am getting an error from VS that is: 


Run-Time Check Failure #1 - A cast to a smaller data type has caused a
loss of data.  If this was intentional, you should mask the source of the
cast with the appropriate bitmask.  For example:  

char c = (i & 0xFF);

Changing the code in this way will not affect the quality of the resulting
optimized code.



Is this a common Multibyte versus Unicode error issue?

Thanks,

K.


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Confitional IF in triggers

2010-10-09 Thread Igor Tandetnik
Russell A  wrote:
> Hi Igor
> I'm converting an Interbase DB for use in a smaller application, so there are 
> many different examples.
> 
> I've included one particular example below, where I have converted a single 
> Interbase trigger (which used IF statements), into 4
> separate SQLite triggers. 
> Any advice appreciated.Russell.
> /* Trigger: TEXTLISTS_B4DEL */
> CREATE TRIGGER TEXTLISTS_B4DEL_genericsinfo BEFORE DELETE ON TEXTLISTS
> when (old.listtype in ('W', 'C')) and
> (select TextList_id from genericsinfo where TextList_id = old.textlist_id 
> Limit 1) is not null
> begin
>  Select Raise(Fail, 'DEPENDANCYERROR');
> end;

Something like this, perhaps:

CREATE TRIGGER TEXTLISTS_B4DEL_genericsinfo BEFORE DELETE ON TEXTLISTS
begin
  select raise(FAIL, 'DEPENDANCYERROR')
  where old.listtype in ('W', 'C') and exists
(select 1 from genericsinfo where TextList_id = old.textlist_id);

  select raise(FAIL, 'DEPENDANCYERROR')
  where old.listtype = 'L' and exists
(select 1 from PRODUCTS where LOCATION = old.identifier);

  select raise(FAIL, 'DEPENDANCYERROR')
  where old.listtype = 'PT' and exists
(select 1 from PRODUCTS where PRODTYPE = old.identifier);

  select raise(FAIL, 'DEPENDANCYERROR')
  where old.listtype = 'PF' and exists
(select 1 from PRODUCTS where PROD_FORM = old.identifier);
end;

You can also combine the four select statements into one statement, by ORing 
all WHERE conditions, or by doing something like this:

select raise(FAIL, 'DEPENDANCYERROR')
where case
when old.listtype in ('W', 'C')
then exists (select 1 from genericsinfo where TextList_id = 
old.textlist_id)
when old.listtype = 'L'
then exists (select 1 from PRODUCTS where LOCATION = old.identifier)
when old.listtype = 'PT'
then exists (select 1 from PRODUCTS where PRODTYPE = old.identifier)
when old.listtype = 'PF'
then exists (select 1 from PRODUCTS where PROD_FORM = old.identifier)
end;

-- 
Igor Tandetnik

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Detach command in 3.7.1 gives "database is locked" error

2010-10-09 Thread Jim Wilcoxson
This may be a bug in 3.7.1, or I may have been taking advantage of a flaw in
3.6.18:

HashBackup uses SQLite to store backup data in a meta data db and file data
archive db.  First I open the main database, then attach an archive
database.  When the archive gets full, I detach it, create a new archive db,
and attach that.  This all worked fine with 3.6.18.

With 3.7.1, I get an error on the detach:  OperationalError: database arc is
locked

The database is not opened in Exclusive mode, and a commit gets executed
before the detach.  What may be causing this - just a guess - is that there
are selects open on the main database at the time of the detach, but the
archive database is not referenced.

Is this a bug in 3.7.1, or a correction to a flaw in 3.6.18?

Thanks,
Jim
--
HashBackup: easy onsite and offsite Unix backup
http://sites.google.com/site/hashbackup
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] using SQLite with mod_perl

2010-10-09 Thread P Kishor
On Sat, Oct 9, 2010 at 6:24 AM, Simon Slavin  wrote:
>
> On 9 Oct 2010, at 7:49am, P Kishor wrote:
>
>> 
>
> My answers to these things are a little weird and I'm not sure I understand 
> at all what you're doing.  But it's a weekend so I'll answer anyway and let 
> you correct me where I've misunderstood it.
>
>>    SELECT col1 FROM table WHERE condition;
>>    if (col1 exists) {
>>        UPDATE table SET col2 = 
>>    }
>>
>> Well, I get the "db is locked" error at the UPDATE statement.
>
> Because you're trying to UPDATE a table while you're in the middle of looking 
> at it, and the UPDATE you make might change the thing you're looking at, 
> which would ruin the SELECT.

I am not. The above was pseudo code.

>There are two cures:
>
> Cure#1: Do the whole SELECT first, and store the answer in an array.  Then 
> work through the array issuing UPDATE commands.  This is not the most 
> efficient way to use SQL but it makes sense to people who are used to 
> programming.
>
> Here is cure #2, which is more likely to be the SQL way of doing it.
>
> I'm not really sure what you mean by your '(col1 exists)' bit, but let's get 
> rid of it for a second and look at the rest of it:
>
>>    SELECT col1 FROM table WHERE condition;
>>        UPDATE table SET col2 = 
>
> The way you do this in SQL is this:
>
> UPDATE table SET col2 =  WHERE condition
>
> So you have one instruction that does all the work for you, including 
> ignoring records it doesn't need to change.  Now, what did you mean by '(col1 
> exists)' ?


Pseudo code.

>
>> So, I want all the perl modules to be loaded when Apache2 starts, and
>> then a $dbh created for each user when the user comes to the web site,
>> but not recreated for the same user on every reload.
>
> I think you may have misunderstood how Apache does its job.  Unless you do 
> things in an unusual manner, Apache treats each page request as a separate 
> 'program',  It spawns a separate 'httpd' process to respond to each request, 
> and the various processes don't talk to one-another.  Variables and handles 
> belong to one particular request for a web page, and disappear as soon as the 
> reply to that request has been sent.
>


Yes, that is how Apache under normal CGI works. But Apache with
mod_perl is a totally different beast. Perl is compiled inside Apache,
and my entire program is compiled and loaded in memory once when
Apache starts up.

Apache still starts separate processes for each request, but all those
processes use the same instance of the once compiled program handled
by the instance of Perl compiled within Apache.

Hence, variables can be shared within processes unless care is taken
to program so they don't.

> So you can't store a database handle between page requests.  Nor should you 
> want to, because you won't be able to tell when the last request comes: any 
> user can close their browser window at any time and you'd never know when to 
> do sqlite3_close().  You close the connection after servicing each web page 
> request.
>
> Treat the servicing of every web page request as a separate running of your 
> program: once it knows it's going to need a SQLite database it opens it using 
> its own handle, and it closes it once it had done all the SQL stuff it's 
> going to need to do.  Of course, if you have many users, each with web 
> browsers open at the same time, then you have many different processes 
> accessing your SQLite database, and you have to handle multi-user situations 
> correctly.


No, to the extent that I understand, mod_perl does not work that way.

My problem is occurring because a shared_lock on the entire db file is
being created for the SELECT, and then that lock is not being
released, so the lock required for the UPDATE is not being given out.

This may be as explained in http://www.sqlite.org/faq.html#q6

I am just trying to solve the above. It may well be that sqlite and
mod_perl may not be good companions (in which case, I am up a 
creek without a db, and will have to look for an alternative storage
solution).

>
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
---
Assertions are politics; backing up assertions with evidence is science
===
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Porting SQLite 3.7.2 to vxWorks 6.7

2010-10-09 Thread ZhiHua Huang
Hello Scott,

I did some searching with these symbols, they should be in 'libos.a'.

rtpLib.o - rtpVerifyAndLock

pgMgrLib.o - pgMgrPageFree, pgMgrPageAllocAt

you should modify kernel components with your VIP project.

Best Regards,

Huang ZhiHua

2010/10/9 Scott A Mintz 

> Thank you.  Those changes (modified slightly for 3.7.2) allowed me to
> create a DKM project that compiles sqlite3.c to libSQLite3.a.
>
> However, when I link my main VIP project, I get the following unresolved
> errors:
> dld: warning: Undefined symbol 'rtpVerifyAndLock' in file 'partialImage.o'
> dld: warning: Undefined symbol 'pgMgrPageFree' in file 'partialImage.o'
> dld: warning: Undefined symbol 'pgMgrPageAllocAt' in file 'partialImage.o'
>
> Those are not directly used by SQLite.  But I have a feeling that one or
> more of the file I/O, semaphore, locking, or memory library system calls
> are...
>
> -Scott
>
> sqlite-users-boun...@sqlite.org wrote on 10/08/2010 07:38:45 AM:
>
> > Hello Scott,
> >
> > Below is my patch on the latest SQLite 3.7.3. Please notice that I
> only
> > verify it with GCC 4.1.2 compiler in VxWorks 6.6/6.7/6.8(I have not
> verify
> > it with my real target machine yet).
> >
> > *** sqlite3.c.orig2010-10-08 10:42:22.0 +0800
> > --- sqlite3.c2010-10-08 19:24:18.390625000 +0800
> > ***
> > *** 17,22 
> > --- 17,26 
> >   ** language. The code for the "sqlite3" command-line shell is also in
> a
> >   ** separate file. This file contains only code for the core SQLite
> > library.
> >   */
> > + #if defined(OS_VXWORKS)
> > + #include 
> > + #endif /* OS_VXWORKS */
> > +
> >   #define SQLITE_CORE 1
> >   #define SQLITE_AMALGAMATION 1
> >   #ifndef SQLITE_PRIVATE
> > ***
> > *** 22795,22801 
> > --- 22799,22811 
> >   #include 
> >   #include 
> >   #include 
> > +
> > + #if defined(OS_VXWORKS) && defined(_WRS_KERNEL)
> > + #include 
> > + #else
> >   #include 
> > + #endif /* OS_VXWORKS */
> > +
> >   #include 
> >   #include 
> >
> > ***
> > *** 24945,24951 
> > --- 24955,24965 
> >   /*
> >** Close a file.
> >*/
> > + #if (OS_VXWORKS < 600)
> >   static int semClose(sqlite3_file *id) {
> > + #else
> > + static int semClose_native(sqlite3_file *id) {
> > + #endif
> > if( id ){
> >   unixFile *pFile = (unixFile*)id;
> >   semUnlock(id, NO_LOCK);
> > ***
> > *** 25581,25587 
> > --- 25595,25607 
> >   }
> >   return -1;
> > }
> > +
> > + #if defined(OS_VXWORKS) && defined(_WRS_KERNEL)
> > +   got = write(id->h, (char *)pBuf, cnt);
> > + #else
> > got = write(id->h, pBuf, cnt);
> > + #endif /* OS_VXWORKS */
> > +
> >   #endif
> > TIMER_END;
> > if( got<0 ){
> > ***
> > *** 26762,26768 
> > --- 26782,26792 
> > semIoFinder,  /* Finder function name */
> > semIoMethods, /* sqlite3_io_methods object name */
> > 1,/* shared memory is disabled */
> > + #if (OS_VXWORKS < 600)
> > semClose, /* xClose method */
> > + #else
> > +   semClose_native,  /* xClose method */
> > + #endif
> > semLock,  /* xLock method */
> > semUnlock,/* xUnlock method */
> > semCheckReservedLock  /* xCheckReservedLock method */
> > ***
> > *** 27517,27523 
> > noLock = eType!=SQLITE_OPEN_MAIN_DB;
> >
> >
> > ! #if defined(__APPLE__) || SQLITE_ENABLE_LOCKING_STYLE
> > struct statfs fsInfo;
> > if( fstatfs(fd, ) == -1 ){
> >   ((unixFile*)pFile)->lastErrno = errno;
> > --- 27541,27547 
> > noLock = eType!=SQLITE_OPEN_MAIN_DB;
> >
> >
> > ! #if (defined(__APPLE__) || SQLITE_ENABLE_LOCKING_STYLE) &&
> > !defined(OS_VXWORKS)
> > struct statfs fsInfo;
> > if( fstatfs(fd, ) == -1 ){
> >   ((unixFile*)pFile)->lastErrno = errno;
> > ***
> > *** 27530,27536 
> > }
> >   #endif
> >
> > ! #if SQLITE_ENABLE_LOCKING_STYLE
> >   #if SQLITE_PREFER_PROXY_LOCKING
> > isAutoProxy = 1;
> >   #endif
> > --- 27554,27560 
> > }
> >   #endif
> >
> > ! #if SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS
> >   #if SQLITE_PREFER_PROXY_LOCKING
> > isAutoProxy = 1;
> >   #endif
> > ***
> > *** 27793,27799 
> > ** tests repeatable.
> > */
> > memset(zBuf, 0, nBuf);
> > ! #if !defined(SQLITE_TEST)
> > {
> >   int pid, fd;
> >   fd = open("/dev/urandom", O_RDONLY);
> > --- 27817,27823 
> > ** tests repeatable.
> > */
> > memset(zBuf, 0, nBuf);
> > ! #if !defined(SQLITE_TEST) && !defined(OS_VXWORKS)
> > {
> >   int pid, fd;
> >   fd = open("/dev/urandom", O_RDONLY);
> >
> > I'v used definitions as below:
> >
> > EXTRA_DEFINE+=-DOS_VXWORKS_660=660
> > EXTRA_DEFINE+=-DOS_VXWORKS_670=670
> > EXTRA_DEFINE+=-DOS_VXWORKS_680=680
> > EXTRA_DEFINE+=

Re: [sqlite] using SQLite with mod_perl

2010-10-09 Thread Simon Slavin

On 9 Oct 2010, at 7:49am, P Kishor wrote:

> 

My answers to these things are a little weird and I'm not sure I understand at 
all what you're doing.  But it's a weekend so I'll answer anyway and let you 
correct me where I've misunderstood it.

>SELECT col1 FROM table WHERE condition;
>if (col1 exists) {
>UPDATE table SET col2 = 
>}
> 
> Well, I get the "db is locked" error at the UPDATE statement.

Because you're trying to UPDATE a table while you're in the middle of looking 
at it, and the UPDATE you make might change the thing you're looking at, which 
would ruin the SELECT.  There are two cures:

Cure#1: Do the whole SELECT first, and store the answer in an array.  Then work 
through the array issuing UPDATE commands.  This is not the most efficient way 
to use SQL but it makes sense to people who are used to programming.

Here is cure #2, which is more likely to be the SQL way of doing it.

I'm not really sure what you mean by your '(col1 exists)' bit, but let's get 
rid of it for a second and look at the rest of it:

>SELECT col1 FROM table WHERE condition;
>UPDATE table SET col2 = 

The way you do this in SQL is this:

UPDATE table SET col2 =  WHERE condition

So you have one instruction that does all the work for you, including ignoring 
records it doesn't need to change.  Now, what did you mean by '(col1 exists)' ?

> So, I want all the perl modules to be loaded when Apache2 starts, and
> then a $dbh created for each user when the user comes to the web site,
> but not recreated for the same user on every reload.

I think you may have misunderstood how Apache does its job.  Unless you do 
things in an unusual manner, Apache treats each page request as a separate 
'program',  It spawns a separate 'httpd' process to respond to each request, 
and the various processes don't talk to one-another.  Variables and handles 
belong to one particular request for a web page, and disappear as soon as the 
reply to that request has been sent.

So you can't store a database handle between page requests.  Nor should you 
want to, because you won't be able to tell when the last request comes: any 
user can close their browser window at any time and you'd never know when to do 
sqlite3_close().  You close the connection after servicing each web page 
request.

Treat the servicing of every web page request as a separate running of your 
program: once it knows it's going to need a SQLite database it opens it using 
its own handle, and it closes it once it had done all the SQL stuff it's going 
to need to do.  Of course, if you have many users, each with web browsers open 
at the same time, then you have many different processes accessing your SQLite 
database, and you have to handle multi-user situations correctly.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] using SQLite with mod_perl

2010-10-09 Thread P Kishor
This is a perl question really, so apologies to the SQLite community.
However, I am stuck, and I am flailing on various forums
(perlmonks/stackoverflow), hoping to strike lucky. My problem is that
I am running into the "database locked" error under mod_perl with
Apache2. I thought I had surmounted this problem, but it is back with
a vengeance.

Here is what is going on in a single web action --

SELECT col1 FROM table WHERE condition;
if (col1 exists) {
UPDATE table SET col2 = 
}

Well, I get the "db is locked" error at the UPDATE statement. Now, in
my httpd.conf I started using

PerlModule Apache::DBI

and I thought my troubles were over. Except, this lock problem has
started rearing up again. I have tried a few other things, such as
starting every db action with `$dbh->begin_work` and ending with
`$dbh->commit`, but I am already using `AutoCommit => 1` so I am not
sure if that even has any effect.

My application is being loaded in Apache conf file with


SetHandler perl-script
PerlHandler Plack::Handler::Apache2
PerlSetVar psgi_app /path/to/application.pl


So, I want all the perl modules to be loaded when Apache2 starts, and
then a $dbh created for each user when the user comes to the web site,
but not recreated for the same user on every reload. I am assuming
that would be the correct way to work speedily.

Perhaps SQLite is the wrong tool to use with mod_perl (or any
persistent web environment), but I want to establish that for sure
before trying some other db.

Any ideas?

-- 
Puneet Kishor
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] C++ Unresolved external errors from DLL

2010-10-09 Thread Michael Pateras
I'm trying to get SQLite working in my C++ project via a DLL, but I"m
getting unresolved external symbol errors.

I downloaded SQLiteDLL-3 from the download page, extracted its contents (a
DLL and a .h file), and ran lib.exe on it to produce a .lib file. I then set
the directory containing the .lib and the .dll files to be an Additional
Library Directory, in the project settings, under Linker >> General. Then I
downloaded SQLiteSource-3 from the download page, and extracted the
SQLite3.h file to the directory with the .Lib and .DLL files, and added that
directory as an Additional Include Directory under C/C++ >> General. I added
#include to my main file, and then added sqlite3.lib as an Additional
Dependency in Linker >> Input.

When I try to compile, I get these errors:

error LNK2019: unresolved external symbol _sqlite3_exec referenced in
function _main

 error LNK2019: unresolved external symbol _sqlite3_open referenced in
function _main

fatal error LNK1120: 2 unresolved externals

Can somebody point me in the right direction to figuring out why this is
happening, and what I can do to resolve it?

Thank you.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users