Re: [sqlite] Which constraint is being violating??

2013-11-05 Thread Rafa de Miguel
raint error message. I'm afraid that I need to implement that validations manually in js on the save action :( Thanks for your help! Rafa El 05/11/13 03:12, Alek Paunov escribió: On 04.11.2013 11:46, Rafa de Miguel wrote: Yes, I knew that but that info it doesn't really help me

Re: [sqlite] Which constraint is being violating??

2013-11-04 Thread Rafa de Miguel
Yes, I knew that but that info it doesn't really help me too much El 04/11/13 10:33, Stephan Beal escribió: On Mon, Nov 4, 2013 at 10:26 AM, Rafa de Miguel < rafael.demig...@openbravo.com> wrote: Do I have control about the WebSQL version or it's Chrome whom decide it? FW

Re: [sqlite] Which constraint is being violating??

2013-11-04 Thread Rafa de Miguel
escribió: Rafa de Miguel wrote: Is there a way to know which constraint is being violated when you receive the message constraint error 19: In example: my_column_name UNIQUE constraint Upgrade SQLite: sqlite> create table t(x unique); sqlite> insert into t values(1); sqlite> insert

[sqlite] Which constraint is being violating??

2013-11-04 Thread Rafa de Miguel
Hello all, Is there a way to know which constraint is being violated when you receive the message constraint error 19: http://www.sqlite.org/c3ref/c_abort.html #define SQLITE_CONSTRAINT 19 /* Abort due to constraint violation */ In example: my_column_name UNIQUE constraint I'm using Web

[sqlite] Calculating Difference between Time using SQLite

2008-05-16 Thread Miguel
. Miguel ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Re: How do I do this

2008-01-13 Thread miguel manese
On Jan 14, 2008 9:09 AM, Vishal Mailinglist <[EMAIL PROTECTED]> wrote: > > sno | id | amount > > > 1| 1 | 200 > > > 2| 1 | 300 > > > 3 | 2 | 100 > > > 4 | 2 | 100 > > > 5 | 1 | 500 > What if I do not have control over sno i.e it is random or unpredictable , > I want to subtract it in

Re: [sqlite] any way to SELECT the 100th-104th row of a table?

2007-10-07 Thread miguel manese
select * from table limit (n-1),(m-n) n-1 because it is 0-based http://www.sqlite.org/lang_select.html On 10/8/07, Adam Megacz <[EMAIL PROTECTED]> wrote: > > Hello. This is probably a stupid question, but... > > Is there any way to include some phrase in a SELECT clause that will > match only t

Re: [sqlite] Sqlite 3.4.2 and VC++ : lib size too big

2007-09-02 Thread Miguel Fuentes
ou > get when you finally link it into an exe. what is the problem here? > > On 9/2/07, Miguel Fuentes <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > I just managed to compile Sqlite 3.4.2 under VC++(Visual C++ 2005 > Express > > Edition, the free one). My problem is

[sqlite] Sqlite 3.4.2 and VC++ : lib size too big

2007-09-02 Thread Miguel Fuentes
nd no debugging information. I'm using the amalgamation source file( I don't know if that really makes any difference) It's quite big comparing to the .exe supplied for windows ( by the way, how was sqlite3.exe - - compiled? which compiler and settings were used?) Thanks, Miguel Fuentes

Re: [sqlite] Re: auto_increment - why does it do the opposite?

2007-08-09 Thread miguel manese
Igor has answered this before. Roughly: 1. all tables has an implicit integer column named "rowid" that is auto increment 2. creating an integer primary key effectively "renames" rowid to that column, so in your case below fields id and rowid are the same IIRC drh replied something else, and sinc

Re: [sqlite] Saving an in-memory database to file

2007-07-24 Thread miguel manese
Or, attach then INSERT-SELECT On 7/25/07, Mohd Radzi Ibrahim <[EMAIL PROTECTED]> wrote: How about dumping and import into new db? - Original Message - From: "Colin Manning" <[EMAIL PROTECTED]> To: Sent: Wednesday, July 25, 2007 7:05 AM Subject: [sqlite] Saving an in-memory database to

Re: [sqlite] Syntax help with UPDATE in SQLite Database Browser

2007-06-07 Thread miguel manese
Maybe you really have to loop "outside" sqlite to align the rows & values. From the result you got and the UPDATE documentation, I can guess that the subselect in the assignment is flattened to a scalar. Unfortunately sqlite does not have something like update tbl1 set col=tbl2.col from tbl2 wher

Re: [sqlite] Longest "real" SQL statement

2007-05-10 Thread miguel manese
I am the author of the package SQLiteDF for R (a statistical package), some sort of sqlite backed "data set". It's "raison d'etre" is to deal with very large datasets, which could be tables with thousands of columns. I am not much on the infinite length sql statement, but I need lots of columns in

Re: [sqlite] Newbee Question

2007-04-04 Thread miguel manese
You have to link against sqlite's shared lib, e.g. in linux $ gcc -L/path/to/sqlite/stuffs -I/path/to/sqlite/stuffs -lsqlite prog.c (the 2nd is a capital i, the 3rd a small L) Cheers, M. Manese On 4/4/07, nshaw <[EMAIL PROTECTED]> wrote: I upgraded from 3.3.1.3 to 3.3.1.4. Up till now, I've

Re: [sqlite] Using AVG() Correctly

2007-02-21 Thread miguel manese
On 2/22/07, Rich Shepard <[EMAIL PROTECTED]> wrote: However, I'm stuck on the proper SQL syntax. A nudge in the right direction -- including pointers to the appropriate documentation -- would be much appreciated. The "rule of thumb" is that anything that appears in the group-by clause can app

Re: [sqlite] about default file permission of SQLite database file

2007-02-21 Thread miguel manese
This is not actually about SQLite. man umask M. Manese On 2/22/07, Shan, Zhe (Jay) <[EMAIL PROTECTED]> wrote: Hi, If to use SQLite to create a database in Linux, the database file will be granted permission 644 as default. Is this value hardcoded in the current version? Is it possible to chang

Re: [sqlite] Restrictions on table names

2007-02-19 Thread miguel manese
There is almost no restrictions, just put it inside square brackets create table foobar ([my $0.02 column] int, ...) M. Manese On 2/20/07, Pablo Santacruz <[EMAIL PROTECTED]> wrote: I'd like to know if there is any restriction on table names. Thanks in advance -- Pablo ---

Re: [sqlite] Possible Memory Leak

2006-12-21 Thread Jose Miguel Goncalves
rds, Brodie John Stanton wrote: Your program does not free the memory malloc'd by sqlite3_errmsg by calling sqlite3_free. I guess that Valgrind is telling you that. You don't have to worry about Sqlite. Jose Miguel Goncalves wrote: Hi, Running a simple sqlite3_open()/sqlite3_close() pr

[sqlite] Possible Memory Leak

2006-12-21 Thread Jose Miguel Goncalves
Hi, Running a simple sqlite3_open()/sqlite3_close() program (attached) I get a report of a possible memory leak in valgrind: $ valgrind --leak-check=full ./test_sqlite ==11992== Memcheck, a memory error detector. ==11992== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al. ==11992

Re: [sqlite] Sqlite 3.3.7 intel compiler warnings

2006-08-30 Thread Miguel Angel Latorre Díaz
I know. I checked them all and at least they are dangerous and probably not obvious. I think the one in os_win.c is really a bug unless the intention were to always return OK. - To unsubscribe, send email to [EMAIL PR

[sqlite] Sqlite 3.3.7 intel compiler warnings

2006-08-30 Thread Miguel Angel Latorre Díaz
I already filtered out all the "common" warnings but these: build.c(1969): remark #1599: declaration hides variable "v" (declared at line 1883) Vdbe *v = sqlite3GetVdbe(pParse); ^ expr.c(1520): remark #1599: declaration hides variable "op" (declared at line 1489)

Re: [sqlite] Cannot compile with SQLITE_OMIT_VIRTUALTABLE

2006-08-17 Thread Miguel Angel Latorre Díaz
Oops. Ok, I got it. Thanks. - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Cannot compile with SQLITE_OMIT_VIRTUALTABLE

2006-08-17 Thread Miguel Angel Latorre Díaz
Lattest cvs sqlite version: If SQLITE_OMIT_VIRTUALTABLE is defined linker complains about: parse.obj : error unresolved external symbol _sqlite3VtabArgExtend in function _yy_reduce parse.obj : error unresolved external symbol _sqlite3VtabArgInit in function _yy_reduce parse.obj : error unreso

Re: [sqlite] Problem installing TCL bindings

2006-04-09 Thread Miguel Bazdresch
able > to type > > package require sqlite3 $ tclsh % package require sqlite3 3.3.5 % Excellent -- thanks for the tip, Thomas. -- Miguel Bazdresch

Re: [sqlite] Problem installing TCL bindings

2006-04-08 Thread Miguel Bazdresch
On 4/7/06, Miguel Bazdresch <[EMAIL PROTECTED]> wrote: > 2. For some reason, the libraries needed for tcl interaction > (libtclsqlite3.so) are not installed by 'make install' I finally determined they *are* installed, to /usr/lib/tcl8.4/sqlite3. A mention of this somew

Re: [sqlite] Problem installing TCL bindings

2006-04-07 Thread Miguel Bazdresch
On 4/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > "Miguel Bazdresch" <[EMAIL PROTECTED]> wrote: > > I must be missing something obvious, but I can't figure out how to > > compile/install the tcl bindings. I've been trying to install > >

[sqlite] Problem installing TCL bindings

2006-04-06 Thread Miguel Bazdresch
; and 'make install'. In case this is useful, after 'make install' I have: [/tmp/build]$ ls -l .libs/tcl* -rw-r--r-- 1 miguel users 77K Apr 6 20:34 .libs/tclsqlite.o [/tmp/build]$ ls -l .libs/libtcl* -rw-r--r-- 1 miguel users 1.5M Apr 6 20:34 .libs/libtclsqlite3.a lrwxrwxrwx 1

[sqlite] future of sqlite

2006-02-08 Thread Miguel Angel Latorre Díaz
Is there any list of future enhancements, new features, etc on sqlite we can drool for?

[sqlite] Check in 3056

2006-02-06 Thread Miguel Angel Latorre Díaz
I think there is a logic error in check in 3056: void *sqlite3Realloc(void *p, int n){ void *np = 0; if( !sqlite3MallocFailed() ){ #ifndef SQLITE_ENABLE_MEMORY_MANAGEMENT int oldsize = OSSIZEOF(p); #endif while( (np = OSREALLOC(p, n))==0 && sqlite3_release_memory(n) ); if( !np || hand

[sqlite] Intel compiler warnings with 3.3.3

2006-02-01 Thread Miguel Angel Latorre Díaz
No bugs, just "benign" warnings. btree.c .\Sqlite\v3\btree.c(432): remark #1418: external definition with no prior declaration int sqlite3_btree_trace=0; /* True to enable tracing */ ^ This variable is only used here and in test3.c. I guess it should be enclosed between the #if SQLITE_T

[sqlite] Intel compiler warnings with 3.3.3

2006-01-31 Thread Miguel Angel Latorre Díaz
I will point out only some kind of warnings I saw (i.e. not signed vs unsigned) using the Intel Compiler: os_win.c .\Sqlite\v3\os_win.c(1482): warning #300: const variable "zeroData" requires an initializer static const ThreadData zeroData; ^ the patch was

[sqlite] Intel compiler warnings with 3.3.2

2006-01-23 Thread Miguel Angel Latorre Díaz
Since these are nots a bug I will post them here my findings with 3.3.2 with Intel compiler (one of the best and fast compiled code I've seen) under Windows: attach.c .\Sqlite\v3\attach.c(36): remark #1418: external definition with no prior declaration int resolveAttachExpr(NameContext *pNam

Re: [sqlite] SQLite -- Very Slow -- ??

2006-01-13 Thread Miguel Angel Latorre Díaz
I usually create a worker thread to send log lines through UDP to a syslog. UDP is damm fast and you do not have to wait.

Re: [sqlite] Thread handling in Windows

2006-01-11 Thread Miguel Angel Latorre Díaz
I'm the one who posted ticket 1601. I have a multithreaded sqlite tcp server, and it ran fine with 2.8.x and 3.x versions, but this "feature" is a stopper for me. I think there is no difference using a dll or not, there is no way to free that thread memory allocated, since that function it us

[sqlite] Intel 9.0 compiler warnings

2005-12-23 Thread Miguel Angel Latorre Díaz
Just for the records. I just compiled sqlite 3.2.8 with a new compiler (Intel 9.0) and gives these warnings (among many others): attach.c .\Sqlite\v3\attach.c(142): remark #1599: declaration hides variable "i" (declared at line 34) int i = db->nDb - 1; date.c .\Sqlite\v3\date.c(506): r

[sqlite] new callback for needed functions

2005-08-11 Thread Miguel Angel Latorre Díaz
I think it would be useful to have a function like sqlite3_function_needed called from the parser (or whatever module) to give the application an opportunity to register the needed function seen in a SQL statement. The idea came up from the sqlite3_collation_needed function which registers a c

[sqlite] temp_store_directory

2005-08-07 Thread Miguel Angel Latorre Díaz
Shouldn't temp_store_directory be private to a sqlite3 structure? Currently it is global (in os_*.c), so setting a value through the pragma affects to all currently opened sqlite connections within the process which may be undesirable. I guess the basic idea is to keep as minimum global variab

RE: [sqlite] Problem with memory using Tcl-defined SQL functions

2005-05-20 Thread Miguel Munoz Arancon
Thank you very much. That was really fast help! Miguel Munoz -Original Message- From: Dan Kennedy [mailto:[EMAIL PROTECTED] Sent: viernes, 20 de mayo de 2005 10:56 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Problem with memory using Tcl-defined SQL functions > The problem

[sqlite] Problem with memory using Tcl-defined SQL functions

2005-05-20 Thread Miguel Muñoz Arancón
y the first block is freed. Do you think that this can be the problem? Please, tell me if someone has had this kind of problem before. And, any idea of how to solve it? Thanks a lot. Miguel Muñoz GMV S.A. http://www.gmv.es/ Well, here goes the s

[sqlite] Problems compiling php 5.0.3 with sqlite3

2005-01-25 Thread José Miguel López Coronado
Hello everybody. I'm trying to compile php 5.0.3 using the --with-sqlite=/usr/local/sqlite/lib option among some others and I obtain the following error code: checking whether to enable UTF-8 support in sqlite (default: ISO-8859-1)... no checking for sqlite support... yes checking for sqlite_ope

Re: [sqlite] Compress/uncompress inline

2004-09-22 Thread Miguel Angel Latorre
tp://www.smartpethealth.com -Original Message- From: Miguel Angel Latorre [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 6:10 PM To: [EMAIL PROTECTED] Subject: Re: [sqlite] Compress/uncompress inline I've done it adding some compression user functions, compress and decompress (

[sqlite] legacy sources

2004-09-22 Thread Miguel Angel Latorre
The encode and decode sources were removed from the src dir, it would be nice to have them such files and alike (md5, etc) in the csv contrib dir.

Re: [sqlite] Compress/uncompress inline

2004-09-22 Thread Miguel Angel Latorre
I've done it adding some compression user functions, compress and decompress (using zlib), also the encode and decode binary functions were added so I could throw some sql in ascii and have the engine compress it: for example: insert into table (field1) values (compress (decode (ascii data)))

Re: [sqlite] Re: *** Please help ***

2004-09-20 Thread Miguel Angel Latorre Díaz
Read the documentation: "The first parameter is a prepared SQL statement. If this statement is a SELECT statement, the Nth column of the returned result set of the SELECT is a table column then the declared type of the table column is returned. If the Nth column of the result set is not at table co

[sqlite] v.3 backups

2004-09-09 Thread Miguel Angel Latorre
Is there any way to backup a database so it leaves the backup file and the original vaccum'ed? That way one could use cron, at, or whatever to programatically run a backup using the shell or alike to backup databases and keeping the new ones vacuum'ed. It would be useful. Refactoring vacuum.c? Any

[sqlite] temporary databases

2004-09-05 Thread Miguel Angel Latorre Díaz
Shouldn't vdbeaux.c line 753: rc = sqlite3BtreeFactory(db, ":memory:", 0, TEMP_PAGES, &pAgg->pBtree); obey the TEMP_STORE macro so it is stored either in memory or disk? I know it's there for speed, but that's what TEMP_STORE is for. Isn't it? If I change in that line the ":memory:" to a 0 (zero)

Re: [sqlite] SQLite & stack size

2004-09-03 Thread Miguel Angel Latorre Díaz
It's not really (or not only) Windows the culprit but rather the compilers that implement lazy memory managers. In my experience, Borland had rather slow functions, always beaten by microsoft (sorry :( ). For instance, there are out some C compilers like LCC that (as I'm told) does not implement an

[sqlite] v3 assert with explain

2004-09-01 Thread Miguel Angel Latorre Díaz
Using v.3.0.5 and executing: explain pragma page_size; or whatever pragma is entered, it throws an assert in function sqlite3VdbeSetNumCols called from main.c line 1037: sqlite3VdbeSetNumCols(sParse.pVdbe, 5);

Re: [sqlite] Locking in 3.0.5

2004-09-01 Thread Miguel Angel Latorre
I agree. Applications shouldn't worry about locking and timeouts. That would be the job for the db core engine, returning as few (none ideally) busy status code as possible. Also, it is not always possible to decide which thread is better to rollback since no info is provided about the status of w

Re: [sqlite] v3 pragmas

2004-07-26 Thread Miguel Angel Latorre Díaz
Thanks, I already knew that. I am trying to return to the user the "famous" affected rows state, but I am not able to know before hand whether it's a create table, select, update, etc statement. So if sqlite3_column_count == 0 the I am positive it is not a select and it 's possibly an insert or upd

[sqlite] v3 pragmas

2004-07-22 Thread Miguel Angel Latorre Díaz
I just discovered that malformed pragma's statements return SQLITE_DONE. For instance "pragma table_info (foo);" if table "foo" does not exist, SQLITE_DONE is returned. Also occurs in completely malformed pragma's like "pragma x;". Also verified in v.2.8.13 One question: I'm returning a recordset

Re: [sqlite] v3 like and collation

2004-07-22 Thread Miguel Angel Latorre Díaz
>You are correct that LIKE and GLOB only work for 7-bit ascii >strings. If you need a LIKE and GLOB that work with Unicode, >you can register alternative LIKE and GLOB functions using >the sqlite3_create_function() API. Yes, I know it can be done that way. BTW, I'm not using Unicode. :) I meant

[sqlite] v3 like and collation

2004-07-21 Thread Miguel Angel Latorre Díaz
Shoudn't the LIKE and GLOB function use a collation if present (either in column definition or by the COLLATE xxx word) ? The new collation functions are used to compare strings, and that's what LIKE and GLOB do (sort of). That way it would correctly handle the > ASCII(127) characters. -- Miguel

[sqlite] v3 high memory consumption

2004-06-25 Thread Miguel Angel Latorre Díaz
Hi all. I have a db v.3.0.1 of 32Mb with a single table and 598356 rows (no indexes). Doing a insert xx into select ... using no joins, only sums and groups by, it takes hours to complete. Besides RAM comsumption raises up to 500MB or more till I ran out of virtual memory. Rows are small in size.

Re: [sqlite] Bug or it makes sense?

2004-06-25 Thread Miguel Angel Latorre Díaz
all be done or undone. - Original Message - From: "kenneth long" <[EMAIL PROTECTED]> To: "Miguel_Angel_Latorre_Díaz" <[EMAIL PROTECTED]> Sent: Friday, June 25, 2004 7:31 PM Subject: Re: [sqlite] Bug or it makes sense? > Miguel, > > I suspect tha

Re: [sqlite] Bug or it makes sense?

2004-06-25 Thread Miguel Angel Latorre Díaz
Ok. But if one just does (also tried with the .read metacommand): sqlite3_exec (db, "begin; create table foo (value1 integer, value2 integer); just an error; commit;", rest of params...) should it do the same? To me, the "begin; ..." is a whole multi statement which should be done whitin a transac

Re: [sqlite] Bug or it makes sense?

2004-06-25 Thread Miguel Angel Latorre Díaz
Ok. But if one just does: sqlite3_exec ("begin; create table foo (value1 integer, value2 integer); just an error; commit;", ...) should it do the same? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mai

[sqlite] Bug or it makes sense?

2004-06-25 Thread Miguel Angel Latorre Díaz
SQLite version 3.0.1 Enter ".help" for instructions sqlite> .tables sqlite> begin; sqlite> create table foo (value1 integer, value2 integer); sqlite> just an error; SQL error: near "just": syntax error sqlite> commit; sqlite> .tables foo sqlite> This was using "shell :memory:" but same happens usi

[sqlite] Proposal for SQLite 3.0

2004-05-20 Thread Miguel Angel LAtorre Díaz
I think version 3.x should do sorting and grouping on disk. Using temporary tables? Once we have btrees, why not using them? It may not be the fastest way of doing it, but it saves lots of memory. Perhaps it could begin doing it in memory and when reaching some certain value it could use the extern