Re: [sqlite] Can you perform an ATTACH-type operation just using DB handles ?

2008-10-16 Thread John Belli
On Thu, 16 Oct 2008 17:54:52 + (UTC), MikeW <[EMAIL PROTECTED]> wrote: >My code has two pre-opened DB connection handles, and would like to >perform an SQL operation over the two databases. >The DB filenames are not available at this point, hence an ATTACH is >not feasible. >Is there any way

[sqlite] Can you perform an ATTACH-type operation just using DB handles ?

2008-10-16 Thread MikeW
My code has two pre-opened DB connection handles, and would like to perform an SQL operation over the two databases. The DB filenames are not available at this point, hence an ATTACH is not feasible. Is there any way to achieve this by applying an ATTACH at the handle level ? Regards, MikeW

Re: [sqlite] SQLITE_SCHEMA question

2008-10-16 Thread Fin Springs
In case anyone's following along and would care to comment it seems like what's happening is: 1. One connection does a DROP TABLE then CREATE TABLE, in back-to-back calls to sqlite3_exec. 2. Another connection does a sqlite3_get_table, which calls sqlite3_exec, which calls sqlite3_prepare,

Re: [sqlite] Foreign Key Triggers: ABORT, FAIL, or ROLLBACK

2008-10-16 Thread John Belli
On Tue, 14 Oct 2008 22:10:12 +0700, Dan <[EMAIL PROTECTED]> wrote: >ABORT seems right to me. Causes the current statement to have no >effect, but does not rollback the current transaction. On Tue, 14 Oct 2008 11:16:17 -0500, Stephen Woodbridge <[EMAIL PROTECTED]> wrote: >I'm not sure there is a

Re: [sqlite] SQLite & ISO8859-x characters (Linux, C)

2008-10-16 Thread Zbigniew Baniewski
Wow, a whole lot of material... thanks. Starting to read it all... -- pozdrawiam / regards Zbigniew Baniewski ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] SQLITE_SCHEMA question

2008-10-16 Thread Fin Springs
I found that it is actually a call to sqlite3_get_table that is returning this error, not sqlite3_exec as I had originally thought. Does that make the cause of getting SQLITE_SCHEMA any easier to pinpoint? ___ sqlite-users mailing list

Re: [sqlite] Malformed schema error on sqlite3odbc.dll with version 0.79

2008-10-16 Thread Enrique Ramirez
I'm not 100% sure about this, but I think SQLiteODBC is a third party project. You might have better luck contacting the original developer (http://www.ch-werner.de/sqliteodbc/) // -- Enrique Ramirez Irizarry Lead Developer Indie Code Labs

Re: [sqlite] Error:"Expression cannot be evaluated" withsqlite3_exec()

2008-10-16 Thread John Belli
On Thu, 16 Oct 2008 08:23:10 + (GMT), Alberto Tellaeche <[EMAIL PROTECTED]> wrote: >int ActualizarBBDDAlumnos(char *dni, float nota) >{ >char *errorMsg; > >char *orden_SQL = sqlite3_mprintf("update ALUMNO set nota=%0.1f where > dni=%Q;",nota,dni); >

Re: [sqlite] SQLITE_SCHEMA question

2008-10-16 Thread Fin Springs
On Oct 15, 2008, at 10:11 PM, Roger Binns rogerb-at-rogerbinns.com | sqlite| wrote: > The main cause of them failing is if the statement becomes > invalid. One example would be if it uses a collation that was > unregistered. I only use sqlite3_exec, so I don't keep prepared statements

[sqlite] Questions about "analyze"

2008-10-16 Thread Clodo
Hi to all, I have a table with many record, that have a field normally with value '0'. Occasionally i update some records by setting the field to '1' to mark it, and after in a background job, i localized them for working on it. For that, i have an index on that field. My problem: if i run an

Re: [sqlite] Compiling with mingw32/msys, and using options

2008-10-16 Thread Shane Harrelson
You can add it as an option to either configure or make. For a makefile generated from configure, you would do something like: make OPTS=-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 TCL is needed to build the amalgamation, as TCl scripts are used to generate the "amalgamated" file. ActiveTCL works.

Re: [sqlite] Syntax error

2008-10-16 Thread Igor Tandetnik
"Darryl Hebbes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I am getting a syntax error like this : > > near ".": syntax error > > when I run the following code. > > > UPDATE site_profile > SET site_profile.title = (select site_profiletemp.title from Make it SET title =

Re: [sqlite] Error:"Expression cannot be evaluated"withsqlite3_exec()

2008-10-16 Thread Igor Tandetnik
"Alberto Tellaeche" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > after sqlite3_mprintf() function, I obtain the string like this: " > update ALUMNO set nota=0.2 where dni='12345678J' " > After sqlite3_exec() errorMsg=NULL (0x Bad ptr), and the > command is not exectuted in

Re: [sqlite] Problem with inserting and integer primary key

2008-10-16 Thread John Belli
On Wed, 15 Oct 2008 12:43:00 -0400, "Igor Tandetnik" <[EMAIL PROTECTED]> wrote: >Be aware that, in order to create a column that aliases ROWID (and thus >has special properties in SQLite, such as getting an automatically >assigned unique integer) it has to be spelled precisely INTEGER PRIMARY

[sqlite] Compiling with mingw32/msys, and using options

2008-10-16 Thread John Belli
Perhaps I just don't know how to use configure and make, but I can't figure out how to use, for example, SQLITE_ENABLE_UPDATE_DELETE_LIMIT when compiling with msys. Do I add it somehow when calling configure, when calling make, or do I edit the Makefile after configure? I am having no problem

[sqlite] Syntax error

2008-10-16 Thread Darryl Hebbes
Hi, I am getting a syntax error like this : near ".": syntax error when I run the following code. UPDATE site_profile SET site_profile.title = (select site_profiletemp.title from site_profiletemp where site_profile.title = site_profiletemp.title), site_profile.title = (select

Re: [sqlite] Error:"Expression cannot be evaluated" withsqlite3_exec()

2008-10-16 Thread Alberto Tellaeche
Hello Igor; I have modified the code to avoid string writting problems now, it is: int ActualizarBBDDAlumnos(char *dni, float nota) { char *errorMsg; char *orden_SQL = sqlite3_mprintf("update ALUMNO set nota=%0.1f where dni=%Q;",nota,dni); sqlite3_exec(db,orden_SQL,0,0,);