[sqlite] Problem whit sqlite_prepare_v2() in 3.7.5 version and later

2013-01-09 Thread ajm

Hi list:

I've an application who from a long time, worked in Windows 98; XP; Vista; W7, 
and now in W8.

The things go fine until now, but with SQLite versions 3.7.15 and 3.7.15.1, 
sqlite3_prepare_v2() fails and return 1.

Here is a brief of the situation:

1.- The application is running in a (local) directory, and there is a dBase  
-say: D:\local\dB-,
who has a table: "CREATE TABLE usr (ky INTEGER PRIMARY KEY,id CHARACTER 
UNIQUE,lev INTEGER,pwd TEXT)"

2.- Use:"PRAGMA page_size=4096"

3.- Create a dBase (same name) in a distinct (foreing) directory. Say: 
D:\someplace\dB

4.- Add the same table design to the "foreing" dbase:
   "CREATE TABLE usr (ky INTEGER PRIMARY KEY,id CHARACTER UNIQUE,lev 
INTEGER,pwd TEXT)"

In a process to populate the foreing table with the "local" values:

5.-  Attach the local dBase: "ATTACH dB AS dbOrig" (without pathname -is local-)

6.-  Prepare to a read statement in the "foreing dBase:
   sqlite3_stmt* sTmt1 = NULL;
   int resp = sqlite3_prepare_v2 (dbPtr, "SELECT ky,id,lev,pwd FROM 
dbOrig.usr", -1, &pStmt1, 0);

Here, resp = 1, and by the way, all previous opperations returned Ok, and the 
mentioned code, works fine with SQLite version 3.7.11.

If I have not inadvertently broken something, perhaps it may be a bug.

HTH.

--
Adolfo J. Millán
Zator Systems


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problem whit sqlite_prepare_v2() in 3.7.5 version and later

2013-01-09 Thread Clemens Ladisch
a...@zator.com wrote:
>int resp = sqlite3_prepare_v2 (dbPtr, "SELECT ky,id,lev,pwd FROM 
> dbOrig.usr", -1, &pStmt1, 0);

 if (resp != SQLITE_OK)
 printf("error message: %s\n", sqlite3_errmsg(dbPtr));


Regards,
Clemens
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problem whit sqlite_prepare_v2() in 3.7.5 version and later

2013-01-09 Thread ajm

>
>  Mensaje original 
> De: Clemens Ladisch 
> Para:  sqlite-users@sqlite.org
> Fecha:  Wed, 09 Jan 2013 14:25:31 +0100
> Asunto:  Re: [sqlite] Problem whit sqlite_prepare_v2() in 3.7.5 version 
> andlater
>
> 
>
>a...@zator.com wrote:
>>int resp = sqlite3_prepare_v2 (dbPtr, "SELECT ky,id,lev,pwd FROM 
>> dbOrig.usr", -1, &pStmt1, 0);
>
> if (resp != SQLITE_OK)
> printf("error message: %s\n", sqlite3_errmsg(dbPtr));
>
>
>Regards,
>Clemens

error message: no such table: dbOri.usr

sqlite> .tables
AgEfHolder AgPdIDtBlockcoco   ftsm_segments
AgEfIDt AgVtHolder FreqUseemail  ftsm_stat
AgEfKlv AgVtIDt Usr   ftsm   lnk
AgEfemer   AgVtPreatm ftsm_content   prm
AgPdHolder AgVtos blb ftsm_segdir


Regards
Adolfo J. Millan


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problem whit sqlite_prepare_v2() in 3.7.5 version and later

2013-01-09 Thread Pavel Ivanov
On Wed, Jan 9, 2013 at 6:06 AM,  wrote:

>
> >
> >  Mensaje original 
> > De: Clemens Ladisch 
> > Para:  sqlite-users@sqlite.org
> > Fecha:  Wed, 09 Jan 2013 14:25:31 +0100
> > Asunto:  Re: [sqlite] Problem whit sqlite_prepare_v2() in 3.7.5 version
> andlater
> >
> >
> >
> >a...@zator.com wrote:
> >>int resp = sqlite3_prepare_v2 (dbPtr, "SELECT ky,id,lev,pwd FROM
> dbOrig.usr", -1, &pStmt1, 0);
> >
> > if (resp != SQLITE_OK)
> > printf("error message: %s\n", sqlite3_errmsg(dbPtr));
> >
> >
> >Regards,
> >Clemens
>
> error message: no such table: dbOri.usr


Did you type error message by hand (please don't do that) or you indeed
forgot the "g" at the end of db name?


>
>
sqlite> .tables
> AgEfHolder AgPdIDtBlockcoco   ftsm_segments
> AgEfIDt AgVtHolder FreqUseemail  ftsm_stat
> AgEfKlv AgVtIDt Usr   ftsm   lnk
> AgEfemer   AgVtPreatm ftsm_content   prm
> AgPdHolder AgVtos blb ftsm_segdir
>
>
> Regards
> Adolfo J. Millan
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problem whit sqlite_prepare_v2() in 3.7.5 version and later

2013-01-09 Thread ajm

>
>  Mensaje original 
> De: Pavel Ivanov 
> Para:   a...@zator.com, General Discussion of SQLite Database 
> 
> Fecha:  Wed, 09 Jan 2013 16:08:51 +0100
> Asunto:  Re: [sqlite] Problem whit sqlite_prepare_v2() in 3.75 version and 
> later
>
> 
> Did you type error message by hand (please don't do that) or you indeed 
> forgot the "g" at the end of db name?

I'm sorry:

The error message is Ok; the original sentence is really without the "g"; I've 
added it only for clarity purpose (the content of the "original" -attached- 
table is used to populate the "foreing" one).

Regards.

--
Adolfo J. Millan.


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users