Re: [sqlite] Rollback transaction if error

2010-12-22 Thread Max Vlasov
On Thu, Dec 23, 2010 at 9:52 AM, BareFeetWare wrote: > > I want to be able to just send a series of SQL commands in a transaction as > a one block of text and have SQLite tell me either that it succeeded so > committed, or that it failed so everything has been rolled back. It is my > understanding

Re: [sqlite] Rollback transaction if error

2010-12-22 Thread BareFeetWare
On 23/12/2010, at 5:38 PM, Drake Wilson wrote: > Quoth BareFeetWare , on 2010-12-23 15:10:30 +1100: >> Is there a way to do this in pure SQL, without my application code >> having to check for errors along the way and then interrogate the >> SQL to look for a "commit" type line and replace it? Thi

Re: [sqlite] Rollback transaction if error

2010-12-22 Thread Drake Wilson
Quoth BareFeetWare , on 2010-12-23 15:10:30 +1100: > Is there a way to do this in pure SQL, without my application code > having to check for errors along the way and then interrogate the > SQL to look for a "commit" type line and replace it? This seems > pretty error prone and convoluted. Why wou

[sqlite] Rollback transaction if error

2010-12-22 Thread BareFeetWare
Hi all, I want to dynamically construct SQL queries that rollback if any part of the transaction fails. For instance, my app constructs the SQL needed to replace a trigger definition, such as: begin immediate; drop trigger if exists "My Trigger"; create trigger "My Trigger" ... new definition ;

[sqlite] fill in blank fileds

2010-12-22 Thread CDN Mark
Hi Igor, worked using SQLite Database browser/execute SQL but didn't work using an .sql file which is the way I would be doing it. Tried it again and it did work using sql file, thanks for your help ___ sqlite-users mailing list sqlite-users@sqlite.

Re: [sqlite] fill in blank fileds

2010-12-22 Thread Igor Tandetnik
On 12/22/2010 7:25 PM, CDN Mark wrote: > Hi Igor, > > not checking for, want to fill in/replace blank or null fields with at least > one character So, does the statement I've shown not do this? Here it is again: UPDATE Aircraft SET CN = '*' where CN = '' or CN is null; In what way does it fail

[sqlite] fill in blank fileds

2010-12-22 Thread CDN Mark
Hi Simon, ran the first example, came back with lots of lines, second test with the just the 10 returned 9 lines as 0: the second line as 2:3832, don't understand the purpose/meaning of this Hi Igor, not checking for, want to fill in/replace blank or null fields with at least one character _

Re: [sqlite] fill in blank fileds

2010-12-22 Thread Igor Tandetnik
On 12/22/2010 6:55 PM, CDN Mark wrote: > I tried using a statement > UPDATE Aircraft SET CN = "*" where CN = ""; > as a test which worked, but not for all records. I don't know if the blank > fields are empty or null I'm not sure I understand the problem. If you are asking how to check both for

Re: [sqlite] fill in blank fileds

2010-12-22 Thread Simon Slavin
On 22 Dec 2010, at 11:55pm, CDN Mark wrote: > I tried using a statement > UPDATE Aircraft SET CN = "*" where CN = ""; > as a test which worked, but not for all records. I don't know if the blank > fields are empty or null Do a SELECT length(CN),hex(CN) FROM Aircraft if that produces too many

[sqlite] fill in blank fileds

2010-12-22 Thread CDN Mark
Hi, looking for help please. Database is a db3, fields are varchar. The problem is that a necessary updating service for this database looks for 'blank' fields, of which there are many, and if there are any, updates ALL the info for that record. The problem is that I want to update with cor

Re: [sqlite] SQLite server

2010-12-22 Thread Sylvain Pointeau
I think you can hide those details, you can perfectly retrieve all rows (or bunch of rows) and then do not make any network access, but still simulate the sqlite API. I would keep the connection open, it doesn't block other clients to connect as well, just the server has to be multi-process. the

Re: [sqlite] 64 bit sqlite 3

2010-12-22 Thread Adam DeVita
At first I was like "awe, I don't wanna do my homework". I'd have to recompile all my little utilities and distribute them rather than just distribute a new DLL and it would be nice to keep our local program maintainers from "helping" instead of keeping to the officially released code. Now

Re: [sqlite] SQLite server

2010-12-22 Thread Doug
This is where I think the problems will crop up. Can you imagine making a network round trip for each row fetch, and then for each column fetch of each row (sqlite3_column_type, sqlite3_column_double, etc). To avoid that, you would need to fetch a lot (buffer) of data and bring it back to the cl

Re: [sqlite] Can a custom SQL function return NULL?

2010-12-22 Thread Richard Hipp
On Wed, Dec 22, 2010 at 1:41 PM, Duquette, William H (318K) < william.h.duque...@jpl.nasa.gov> wrote: > On 12/22/10 10:35 AM, "Richard Hipp" wrote: > > On Wed, Dec 22, 2010 at 1:16 PM, Duquette, William H (318K) < > william.h.duque...@jpl.nasa.gov> wrote: > > > If I define a custom SQL function i

Re: [sqlite] Can a custom SQL function return NULL?

2010-12-22 Thread Duquette, William H (318K)
On 12/22/10 10:52 AM, "Simon Slavin" wrote: >> There is no way to get a Tcl function to return NULL, since TCL has no >> concept of NULL. So, no, sadly, you cannot get an SQLite function >> implemented in Tcl to return NULL. > > ... but you might find reading this useful: > >

[sqlite] [ANN] Free Valentina Studio Pro - Please Give Us Feedback on SQLite Support

2010-12-22 Thread Lynn Fredricks
Paradigma Software's Valentina Studio Pro is a powerful creation, analysis and reporting tool for database developers. With Valentina Studio 4.8, we added support for SQLite databases. This means the built in features like Visual SQL Builder, Diagrams, Report printing, and more are available for us

Re: [sqlite] Can a custom SQL function return NULL?

2010-12-22 Thread Simon Slavin
On 22 Dec 2010, at 6:35pm, Richard Hipp wrote: > On Wed, Dec 22, 2010 at 1:16 PM, Duquette, William H (318K) < > william.h.duque...@jpl.nasa.gov> wrote: > >> If I define a custom SQL function in Tcl using the SQLite "$db function" >> command, is there any way to make the function return NULL? I

Re: [sqlite] Can a custom SQL function return NULL?

2010-12-22 Thread Duquette, William H (318K)
On 12/22/10 10:35 AM, "Richard Hipp" wrote: On Wed, Dec 22, 2010 at 1:16 PM, Duquette, William H (318K) < william.h.duque...@jpl.nasa.gov> wrote: > If I define a custom SQL function in Tcl using the SQLite "$db function" > command, is there any way to make the function return NULL? I'm guessing

Re: [sqlite] Can a custom SQL function return NULL?

2010-12-22 Thread Richard Hipp
On Wed, Dec 22, 2010 at 1:16 PM, Duquette, William H (318K) < william.h.duque...@jpl.nasa.gov> wrote: > If I define a custom SQL function in Tcl using the SQLite "$db function" > command, is there any way to make the function return NULL? I'm guessing > not. > There is no way to get a Tcl functi

[sqlite] Can a custom SQL function return NULL?

2010-12-22 Thread Duquette, William H (318K)
If I define a custom SQL function in Tcl using the SQLite "$db function" command, is there any way to make the function return NULL? I'm guessing not. Thanks! -- Will Duquette -- william.h.duque...@jpl.nasa.gov Athena Development Lead -- Jet Propulsion Laboratory "It's amazing what you can do

Re: [sqlite] SQLite server

2010-12-22 Thread Sylvain Pointeau
Why not doing it with DCOM or Corba or what ever even the sockets? but hidden behind the same API of SQLite. The "real" sqlite lib will be on the server. is it called "remote procedure call"? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sq

Re: [sqlite] SQLite server

2010-12-22 Thread Simon Slavin
On 22 Dec 2010, at 2:41pm, Philip Graham Willoughby wrote: > You would need to reintroduce practically everything you think you can get > rid of if you wish to ensure that there is only one process and you are > intending to provide a facility for two transactions to be active > concurrently.

Re: [sqlite] SQLite server

2010-12-22 Thread Philip Graham Willoughby
On 22 Dec 2010, at 13:12, Simon Slavin wrote: > > You do mention something worthwhile: if you had a server/client version of > SQLite you could get rid of all the code to do with file sharing and locking. > That's quite a lot of code, if you include all the PRAGMAs and related > programming

Re: [sqlite] how to realize rollback or commit using sqlite?

2010-12-22 Thread Igor Tandetnik
zhaoyinghuan wrote: > I think sqlite can automatically do commit or rollback when sql > statments(insert,update,or delete) are finished. > Is it correct? Or it must use "Begin transation"? > Anybody can give me some examples? You can start an explicit transaction by running BEGIN [TRANSACTION]

Re: [sqlite] SQLite server

2010-12-22 Thread jeff archer
From: Simon Slavin Date: Tue, 21 Dec 2010 14:19:25 + >This was my first thought when I considered implementing an SQLite-over-IP >protocol: that there was no user model and therefore no need for passwords.  >Mounting a >database on the server would mean that anyone who knew your IP >address

Re: [sqlite] SQLite server

2010-12-22 Thread Simon Slavin
On 22 Dec 2010, at 12:45am, Jeff Archer wrote: > A SQLite Server would be userful. I have considered creating this myself. I > have thought that it would need to be kept zero config and it should be > provided > in amalgamation form to keep simple to embed in applications. Wouldn't need >

[sqlite] how to realize rollback or commit using sqlite?

2010-12-22 Thread zhaoyinghuan
Hi, erveryone I'm a beginner. I think sqlite can automatically do commit or rollback when sql statments(insert,update,or delete) are finished. Is it correct? Or it must use "Begin transation"? Anybody can give me some examples? Thanks. __

Re: [sqlite] SQLite server

2010-12-22 Thread Jeff Archer
Just my two cents... A SQLite Server would be userful.  I have considered creating this myself.  I have thought that it would need to be kept zero config and it should be provided in amalgamation form to keep simple to embed in applications.  Wouldn't need incredible throughput as it is a Serv

Re: [sqlite] SQLite server

2010-12-22 Thread Sylvain Pointeau
and what about using a DCOM like technology to open a distant database? the sqlite API will stay the same but behind the scene, it will access your server using a DCOM like technology? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.or

Re: [sqlite] SQLite server

2010-12-22 Thread Neville Franks
Wednesday, December 22, 2010, 1:19:25 AM, you wrote: SS> On 21 Dec 2010, at 1:44pm, Philip Graham Willoughby wrote: >> Implementing an SQLite-based server does not obviously enable this in and of >> itself. If you could open a database on a remote machine using its filename >> as the OP was try

[sqlite] FTS3 + SQLITE_OMIT_PAGER_PRAGMAS causes division by zero exception

2010-12-22 Thread Ralf Junker
Recent changes to FTS3 apparently require that SQLite must be compiled with pager pragmas, otherwise FTS3 will cause a division by zero exception as I have experienced right now. This means that the FTS3 extension can crash an application if the core SQLite library is compiled with SQLITE_OMIT_PAG

Re: [sqlite] SQLite server

2010-12-22 Thread Philip Graham Willoughby
On 21 Dec 2010, at 14:19, Simon Slavin wrote: > > On 21 Dec 2010, at 1:44pm, Philip Graham Willoughby wrote: > >> Implementing an SQLite-based server does not obviously enable this in and of >> itself. If you could open a database on a remote machine using its filename >> as the OP was trying

[sqlite] Nicolas Bonte is out of the office.

2010-12-22 Thread Nicolas Bonte
I will be out of the office starting 21/12/2010 and will not return until 05/01/2011. For urgent matter you can directly contact me on following number : +32 476962721 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin

Re: [sqlite] SQLite and Windows 95

2010-12-22 Thread joel . guittet-ext
Hi, Thanks to you to help me with this problem. As I do not require special features (only insert/select/order by/delete), I think it is maybe easier to use an old version of SQLite. I will try with 3.6.10 as said by Max. If it does not work I will try an older one. Regards, Joel __