[sqlite] Erros using some compiler options for SQLite 3. and V. Studio 2015

2015-10-25 Thread a...@zator.com
Keith:

Thank a lot.

Now, the file compiles without error, although still there are two warnings 
(unreferenced local variables):

1>sqlite3\sqlite3.c(79452): warning C4101: 'z': variable local sin referencia

1>sqlite3\sqlite3.c(79451): warning C4101: 'zTrace': variable local sin 
referencia

Perhaps the sentence

 #ifndef SQLITE_OMIT_TRACE

must be moved up a couple lines 

Thanks again.

--
Adolfo

>
>  Mensaje original 
> De: "Keith Medcalf" 
> Para:  "ajm at zator.com" , "General Discussion of SQLite 
> Database" 
> Fecha:  Sun, 25 Oct 2015 13:56:33 -0600
> Asunto:  RE: [sqlite] Erros using some compiler options for SQLite 3. and V. 
> Studio 2015
>
>
>Try changing:
>
>> #define SQLITE_OMIT_TCL_VARIABLE
>> #define SQLITE_OMIT_PROGRESS_CALLBACK
>> #define SQLITE_OMIT_FOREIGN_KEY
>> #define SQLITE_OMIT_AUTOVACUUM
>> #define SQLITE_OMIT_EXPLAIN
>> #define SQLITE_SECURE_DELETE
>> #define SQLITE_OMIT_BUILTIN_TEST
>> #define SQLITE_OMIT_TRACE
>> #define SQLITE_ENABLE_FTS3
>> #define SQLITE_ENABLE_FTS3_PARENTHESIS
>
>to
>
>#define SQLITE_OMIT_TCL_VARIABLE 1
>#define SQLITE_OMIT_PROGRESS_CALLBACK 1
>#define SQLITE_OMIT_FOREIGN_KEY 1
>#define SQLITE_OMIT_AUTOVACUUM 1
>#define SQLITE_OMIT_EXPLAIN 1
>#define SQLITE_SECURE_DELETE 1
>#define SQLITE_OMIT_BUILTIN_TEST 1
>#define SQLITE_OMIT_TRACE 1
>#define SQLITE_ENABLE_FTS3 1
>#define SQLITE_ENABLE_FTS3_PARENTHESIS 1
>
>in your config.h and see if this resolves the issue.
>
>> -Original Message-
>> From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-
>> bounces at mailinglists.sqlite.org] On Behalf Of ajm at zator.com
>> Sent: Sunday, 25 October, 2015 13:24
>> To: sqlite-users at mailinglists.sqliteorg
>> Subject: [sqlite] Erros using some compiler options for SQLite 3. and V.
>> Studio 2015
>> 
>> Hi list:
>> 
>> Using SQLite v.3.9.1 amalgamation code.
>> MS Visual Studio 2015 for desktop C++ compiler
>> 
>> I've got the same compiler error
>> 
>> 1>sqlite3\sqlite3.c(x): fatal error C1017: expresi?n constante de tipo
>> entero no v?lida
>> 
>>  in the following lines of sqlite3.c:
>> 
>>  #if SQLITE_ENABLE_FTS3
>>  #if SQLITE_ENABLE_FTS3_PARENTHESIS
>>  #if SQLITE_OMIT_AUTOVACUUM
>>  #if SQLITE_OMIT_BUILTIN_TEST
>>  #if SQLITE_OMIT_EXPLAIN
>>  #if SQLITE_OMIT_FOREIGN_KEY
>>  #if SQLITE_OMIT_PROGRESS_CALLBACK
>>  #if SQLITE_OMIT_TCL_VARIABLE
>>  #if SQLITE_OMIT_TRACE
>>  #if SQLITE_SECURE_DELETE
>> 
>> The application compiles correctly except when includes the config.h file
>> with these compiler options:
>> 
>> #define SQLITE_OMIT_TCL_VARIABLE
>> #define SQLITE_OMIT_PROGRESS_CALLBACK
>> #define SQLITE_OMIT_FOREIGN_KEY
>> #define SQLITE_OMIT_AUTOVACUUM
>> #define SQLITE_OMIT_EXPLAIN
>> #define SQLITE_SECURE_DELETE
>> #define SQLITE_OMIT_BUILTIN_TEST
>> #define SQLITE_OMIT_TRACE
>> #define SQLITE_ENABLE_FTS3
>> #define SQLITE_ENABLE_FTS3_PARENTHESIS
>> 
>> The only directives of my config.h that seem be accepted, are:
>> 
>> #define SQLITE_MAX_VARIABLE_NUMBER 25
>> #define SQLITE_THREADSAFE 1
>> 
>> Note that the proyect also compiles smoothly without errors using all the
>> compiler directives with SQLite v.3.7.15.1 and MS V. Studio 2013.
>> 
>> Any suggestion would be appreciated.
>> 




[sqlite] What is a virtual table's xSync() callback supposed to do?

2015-10-25 Thread Johnny Wezel
Should it check for external changes on the resource to check for
concurrency conflicts? The documentation isn't very specific on this.

Cheers,
Johnny


[sqlite] Erros using some compiler options for SQLite 3. and V. Studio 2015

2015-10-25 Thread a...@zator.com
Hi list:

Using SQLite v.3.9.1 amalgamation code.
MS Visual Studio 2015 for desktop C++ compiler

I've got the same compiler error

1>sqlite3\sqlite3.c(x): fatal error C1017: expresi?n constante de tipo 
entero no v?lida

 in the following lines of sqlite3.c:

#if SQLITE_ENABLE_FTS3
#if SQLITE_ENABLE_FTS3_PARENTHESIS
#if SQLITE_OMIT_AUTOVACUUM
#if SQLITE_OMIT_BUILTIN_TEST
#if SQLITE_OMIT_EXPLAIN
#if SQLITE_OMIT_FOREIGN_KEY
#if SQLITE_OMIT_PROGRESS_CALLBACK
#if SQLITE_OMIT_TCL_VARIABLE
#if SQLITE_OMIT_TRACE
#if SQLITE_SECURE_DELETE

The application compiles correctly except when includes the config.h file with 
these compiler options:

#define SQLITE_OMIT_TCL_VARIABLE
#define SQLITE_OMIT_PROGRESS_CALLBACK
#define SQLITE_OMIT_FOREIGN_KEY
#define SQLITE_OMIT_AUTOVACUUM
#define SQLITE_OMIT_EXPLAIN
#define SQLITE_SECURE_DELETE
#define SQLITE_OMIT_BUILTIN_TEST
#define SQLITE_OMIT_TRACE
#define SQLITE_ENABLE_FTS3
#define SQLITE_ENABLE_FTS3_PARENTHESIS

The only directives of my config.h that seem be accepted, are:

#define SQLITE_MAX_VARIABLE_NUMBER 25
#define SQLITE_THREADSAFE 1

Note that the proyect also compiles smoothly without errors using all the 
compiler directives with SQLite v.3.7.15.1 and MS V. Studio 2013.

Any suggestion would be appreciated.

--
Adolfo J. Millan



[sqlite] from hfiandor about a unit in spanish

2015-10-25 Thread Stephen Chrzanowski
This isn't SQL related, however, being a Delphi developer, I'll help.

Not sure if Laz (I've only done a cursory glance at the whole package) will
support it, but you might be able to set the forms "ActiveComponent"
property to nil.  Either that, use the buttons "OnMouseOver" event and find
out what the current active form component is, and reset it.  The other
option is, hard-code (ugly word) a form component to be the active
component when bFase2 is clicked.

On Sun, Oct 25, 2015 at 4:24 PM, H?ctor Fiandor 
wrote:

> Dear Members:
>
> I have found the solution of my problem about "do the routines up to the
> error message appear. Then I close the table,
> and do an application.terminate. Then I start again but go to a phase2
> routines, following the logical plan, generally up to the end of process."
> It was simple, "click the button Fase2.".
> Now, I have another problem: when the phase0 finish, then I do:
> bFase2.SetFocus; to do easier the starting of the second procedure.
> But, when the Process finish, this button remain with the focus. How to
> loose the bFase2.Focus?
> Thanks in advance,
>
>
> Ing. H?ctor Fiandor
> hfiandor at ceniai.inf.cu
>
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] from hfiandor about a unit in spanish

2015-10-25 Thread Héctor Fiandor
Dear Members:

I have found the solution of my problem about "do the routines up to the
error message appear. Then I close the table,
and do an application.terminate. Then I start again but go to a phase2
routines, following the logical plan, generally up to the end of process."
It was simple, "click the button Fase2.".
Now, I have another problem: when the phase0 finish, then I do:
bFase2.SetFocus; to do easier the starting of the second procedure.
But, when the Process finish, this button remain with the focus. How to
loose the bFase2.Focus?
Thanks in advance,


Ing. H?ctor Fiandor
hfiandor at ceniai.inf.cu



[sqlite] SELECT SUM(...) FROM ... WHERE regression in 3.8.11

2015-10-25 Thread Simon Slavin

On 24 Oct 2015, at 8:23pm, Catalin Ionescu  
wrote:

> So far I never used the command-line shell. It is clearly compiled with 
> different optimization settings and that might be the cause of apparent 
> correct functionality. Anyway, I decided to give it a try and attack the 
> problem as a whole (I suspected, from previous experience, that the bug is 
> just randomly appearing!). So I have fired up the shell, opened the DB file, 
> pasted the CREATE TEMP VIEW... statements and executed "select 
> sum(Quantity*PriceMed) from Stocks_View;". With 3.8.11 and newer I get a 
> results around 20528.817 and with 3.8.10.2 and older I get a results around 
> 11383.248. The value with the older SQLite versions is the correct one!
> 
> Is this considered a satisfactory proof that there is a problem starting with 
> version 3.8.11?

Maybe.  It does at least give the development team something they can test 
without having to have a copy of your program.

There are some ambiguities in the specifications for SQL and SQLite, where the 
documentation says that something is undefined or perhaps doesn't mention it at 
all.  The thing you noticed may be one of them.  They usually involve NULLs or 
other troublesome thing like that.

Another possibility is that your database is corrupt.  Find this out using



There are two ways to proceed:

A) put a copy of your database somewhere where the dev team can download it
B) simplify your problem set by deleting tables and rows to the point where the 
commands to reproduce the problem are short.  (You can obtain the commands 
needed using the .dump command for the command-line shell.)  Then just post 
here listing the commands needed as text in your post.

Simon.


[sqlite] Erros using some compiler options for SQLite 3. and V. Studio 2015

2015-10-25 Thread Keith Medcalf

Try changing:

> #define SQLITE_OMIT_TCL_VARIABLE
> #define SQLITE_OMIT_PROGRESS_CALLBACK
> #define SQLITE_OMIT_FOREIGN_KEY
> #define SQLITE_OMIT_AUTOVACUUM
> #define SQLITE_OMIT_EXPLAIN
> #define SQLITE_SECURE_DELETE
> #define SQLITE_OMIT_BUILTIN_TEST
> #define SQLITE_OMIT_TRACE
> #define SQLITE_ENABLE_FTS3
> #define SQLITE_ENABLE_FTS3_PARENTHESIS

to

#define SQLITE_OMIT_TCL_VARIABLE 1
#define SQLITE_OMIT_PROGRESS_CALLBACK 1
#define SQLITE_OMIT_FOREIGN_KEY 1
#define SQLITE_OMIT_AUTOVACUUM 1
#define SQLITE_OMIT_EXPLAIN 1
#define SQLITE_SECURE_DELETE 1
#define SQLITE_OMIT_BUILTIN_TEST 1
#define SQLITE_OMIT_TRACE 1
#define SQLITE_ENABLE_FTS3 1
#define SQLITE_ENABLE_FTS3_PARENTHESIS 1

in your config.h and see if this resolves the issue.

> -Original Message-
> From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-
> bounces at mailinglists.sqlite.org] On Behalf Of ajm at zator.com
> Sent: Sunday, 25 October, 2015 13:24
> To: sqlite-users at mailinglists.sqlite.org
> Subject: [sqlite] Erros using some compiler options for SQLite 3. and V.
> Studio 2015
> 
> Hi list:
> 
> Using SQLite v.3.9.1 amalgamation code.
> MS Visual Studio 2015 for desktop C++ compiler
> 
> I've got the same compiler error
> 
> 1>sqlite3\sqlite3.c(x): fatal error C1017: expresi?n constante de tipo
> entero no v?lida
> 
>  in the following lines of sqlite3.c:
> 
>   #if SQLITE_ENABLE_FTS3
>   #if SQLITE_ENABLE_FTS3_PARENTHESIS
>   #if SQLITE_OMIT_AUTOVACUUM
>   #if SQLITE_OMIT_BUILTIN_TEST
>   #if SQLITE_OMIT_EXPLAIN
>   #if SQLITE_OMIT_FOREIGN_KEY
>   #if SQLITE_OMIT_PROGRESS_CALLBACK
>   #if SQLITE_OMIT_TCL_VARIABLE
>   #if SQLITE_OMIT_TRACE
>   #if SQLITE_SECURE_DELETE
> 
> The application compiles correctly except when includes the config.h file
> with these compiler options:
> 
> #define SQLITE_OMIT_TCL_VARIABLE
> #define SQLITE_OMIT_PROGRESS_CALLBACK
> #define SQLITE_OMIT_FOREIGN_KEY
> #define SQLITE_OMIT_AUTOVACUUM
> #define SQLITE_OMIT_EXPLAIN
> #define SQLITE_SECURE_DELETE
> #define SQLITE_OMIT_BUILTIN_TEST
> #define SQLITE_OMIT_TRACE
> #define SQLITE_ENABLE_FTS3
> #define SQLITE_ENABLE_FTS3_PARENTHESIS
> 
> The only directives of my config.h that seem be accepted, are:
> 
> #define SQLITE_MAX_VARIABLE_NUMBER 25
> #define SQLITE_THREADSAFE 1
> 
> Note that the proyect also compiles smoothly without errors using all the
> compiler directives with SQLite v.3.7.15.1 and MS V. Studio 2013.
> 
> Any suggestion would be appreciated.
> 
> --
> Adolfo J. Millan
> 
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users





[sqlite] accessing database from Lua and C

2015-10-25 Thread Lev
Hi List,


I'm writing an application in native C that calls Lua scripts.

Untill now my architecture does all the SQLite work in C, and pass simple
variables on Lua's stack.

Today morning I've got an idea to push only the database connection object.
The database is opened in the C code, however I only have a single thread, so
no other entity is accessing the database at the same time.

Other solution would be to pass the filename of the database, but then I have
to close the connection. Must I?

I don't know if it is possible.

Thanks for your hints in advance.

Lev

-- 
73 de HA5OGL
Op.: Levente


[sqlite] accessing database from Lua and C

2015-10-25 Thread Simon Slavin

On 25 Oct 2015, at 10:05am, Lev  wrote:

> Untill now my architecture does all the SQLite work in C, and pass simple
> variables on Lua's stack.
> 
> Today morning I've got an idea to push only the database connection object.
> The database is opened in the C code, however I only have a single thread, so
> no other entity is accessing the database at the same time.

Can you use LuaSQLite3 or Lua-Sqlite3 to open a connection initially ?




> Other solution would be to pass the filename of the database, but then I have
> to close the connection. Must I?

You can have a C connection and a Lua connection at the same time, as long as 
you don't need to perform operations in both at the same time.

Simon.