Re: [sqlite] database is locked error

2007-04-28 Thread TB

Following up an old thread:

The SQLite sources include an (Apple-supplied) patch to work around  
the problem. Recompile

with

   -DSQLITE_ENABLE_LOCKING_STYLE=1

We are working toward turning on this patch by default, but we are  
not quite there yet.


I compiled and ran SQLite 3.3.17 and got the old error again when  
accessing a database file on a server volume, with SQLite saying it  
is locked.


Does this mean that we are still not quite there yet with a default  
fix? Any time frame?


Thanks,
Tom


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] sqlite and borland c++ builder

2007-04-28 Thread Jonathan Kahn
This is my first post and it is out of desperation.  I am using Borland c++
builder with Borland developer studio 2006 I can not for the life of me get
anything sqlite functioning properly with this.  I have relentlessly
searched google as well as the mailing list and tried any information I have
found and have been for the most part completely unsuccessful and it is
beginning to drive me a little crazy.  

 

  When I try to use the header I get errors

 [C++ Error] sqlite3.h(1778): E2232 Constant member
'sqlite3_index_info::nConstraint' in class without constructors

 

Perhaps I can not include the header directly like that, either way I then
tried to use a dll. 

I did the following from which I found in the mailing list:

 

  impdef -a sqlite3.def sqlite3.dll

  impdef sqlite3.lib sqlite3.def

 

  I then add this lib file to my project and it compiled however when using
any code involving sqlite it turned to disaster.

 

  I added to my code:

 

  typedef struct sqlite3 sqlite3;

 

As well as: 

 

extern C {

 __declspec(dllimport) int sqlite3_open(const char *filename,sqlite3
**ppDb);

 __declspec(dllimport) int sqlite3_close(sqlite3*);

}

 

It compiled fine and I was able to declare:

 

__fastcall TForm1::TForm1(TComponent* Owner)

: TForm(Owner)

{

 

sqlite3 *db;

int res;

 

res = sqlite3_open(my.db,db);

 

I had an if statement as well checking res, etc but just calling
sqlite3_open causes some sort of unknown exception.  I have no idea what to
do Ive been trying to figure this out for many, many hours.  Can someone
please help me 

 

Thanks and Much, much appreciation,

- Jon

 

 

 



Re: [sqlite] sqlite and borland c++ builder

2007-04-28 Thread Joe Wilson
   When I try to use the header I get errors
 
  [C++ Error] sqlite3.h(1778): E2232 Constant member
 'sqlite3_index_info::nConstraint' in class without constructors

It appears it is trying to compile the sqlite header file as if it were C++.
Lemme guess - you're using the almalgomated sqlite3.c from 3.3.17, right?

from the generated sqlite3.c:

 /*
 ** Make sure we can call this stuff from C++.
 */
 #if 0
 extern C {
 #endif

See the #if 0? That's the problem. It should be:

 #if __cplusplus

SQLite 3.3.17 has a bug in sqlite3.c generation.
To work around this issue, do this:

 extern C {
 #include sqlite3.h
 }


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] sqlite and borland c++ builder

2007-04-28 Thread Joe Wilson
I wrote too quickly - sqlite3.h correctly uses __cplusplus for extern C.

But the almalgomated sqlite3.c cannot be compiled from a C++ compiler
for the reasons described below.

--- Joe Wilson [EMAIL PROTECTED] wrote:
When I try to use the header I get errors
  
   [C++ Error] sqlite3.h(1778): E2232 Constant member
  'sqlite3_index_info::nConstraint' in class without constructors
 
 It appears it is trying to compile the sqlite header file as if it were C++.
 Lemme guess - you're using the almalgomated sqlite3.c from 3.3.17, right?
 
 from the generated sqlite3.c:
 
  /*
  ** Make sure we can call this stuff from C++.
  */
  #if 0
  extern C {
  #endif
 
 See the #if 0? That's the problem. It should be:
 
  #if __cplusplus
 
 SQLite 3.3.17 has a bug in sqlite3.c generation.
 To work around this issue, do this:
 
  extern C {
  #include sqlite3.h
  }
 
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com 
 
 -
 To unsubscribe, send email to [EMAIL PROTECTED]
 -
 
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, send email to [EMAIL PROTECTED]
-