Ritesh Kapoor,

Thank you for your response. I attempted to send you a response complete
with screenshots to eliminate any ambiguity but it was returned unsent
because it was too large for your mail daemon (30,000 bytes). 

I took your advice and ran the query you suggested which produced this
result:

------------------------------

sqlite> .tables
t
sqlite> .schema
CREATE TABLE t( one varchar( 10 ), two smallint );
sqlite> select * from sqlite_master;
table|t|t|2|CREATE TABLE t( one varchar( 10 ), two smallint )
sqlite>

------------------------------


Also, I have taken care to make certain that the "sqlite3.exe" executable,
all databases (highlighted in red), and my import files (*.txt) are all in
the same directory to avoid path issues. Please see the screenshot below:

DELETED


------------------------------

I've created a very simple database named "DBm" with one table "t" and 2
fields, a varchar(10) and a smallint. Please see the screenshot below:
 

DELETED - the screenshot showed the following:


D:\DATA\SQLite>sqlite3 DBm
SQLite version 3.3.17
Enter ".help" for instructions
sqlite> .tables
t
sqlite> .schema
CREATE TABLE t( one varchar( 10 ), two smallint );
sqlite>
 

------------------------------

Then, using the examples in the SQLite documentation, I ran the example
code: 

int main( )
{
      sqlite3 *db;
      char *zErrMsg = 0;
      int rc;

      // Test Open
      rc = sqlite3_open( "DBm", & db );
      if( rc )
      {
            assert( false );
            fprintf( stderr, "Can't open database: %s\n", sqlite3_errmsg(
db );
            sqlite3_close( db );
            Sleep( 5000 );
            return( 1 );
      }


      // Test SELECT
      rc = sqlite3_exec( db, "SELECT * from t", callback, 0, &zErrMsg );
      if( rc!=SQLITE_OK )
      {
            fprintf( stderr, "SQL error: %s\n", zErrMsg );
            Sleep( 15000 );
            sqlite3_free( zErrMsg );
            return( 1 );
      }

The failure occurs on the sqlite3_exec( ) call. 

------------------------------

And I receive this message (see screenshot):


DELETED 


"SQL error: no such table: t"

------------------------------

 
What I'm attempting to do is about as vanilla an application as I can
think of. 

I am open to any other suggestions as to what the problem might be. I hope
you are correct that the problem will turn out to be something very small.

Sincerely,

Lee Crain
Senior Software Engineer
DAZ 3D Productions
801-495-1777, x759 
[EMAIL PROTECTED]

__________________________________________________________________________
____________________________________


-----Original Message-----
From: Ritesh Kapoor [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 02, 2007 10:20 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; sqlite-users@sqlite.org
Subject: Re: [sqlite] Problem: SQLite C++ Examples in the SQLite
Documentation No Longer Work; Can't See Tables in Database
Importance: High

Try connecting to this database using the SQLite command line browser and
then check if the table 'tb1' exists. Most probably it dosen't.

You can check which all tables have been created using the query -

"select * from sqlite_master"

Regards,
Ritesh

> I've had to do a complete backtrack today. I went back to where I was 3
> weeks ago.
>
>
>
> I used the SQLite command line documentation to create the "ex1"
> database and enter 2 data records, exactly as the example shows.
>
>
>
> Then, I copied and pasted the SQLite C++ example into my program and
> attempted to execute it. It failed with a "table does not exist" error
> for the "tbl1" table in the "ex1" database.
>
>
>
> I've re-extracted the sqlite3 executable onto my hard drive and
> overwritten the old one. I've completely cleaned and rebuilt my project.
> Nothing has prevented this failure from recurring except for one thing:
>
> I have the original SQLite test database I created 3 weeks ago and I can
> still read it with the SQLite C++ example code and my C++ code. Why is
> this so?
>
>
>
> Is there some database metadata hidden somewhere on my hard drive that
> might be corrupted? If so, how do I resolve the problem with it?
>
>
>
> Thanks,
>
>
>
> Lee Crain
>
> Senior Software Engineer
>
> DAZ 3D Productions
>
> 801-495-1777, x759
>
> [EMAIL PROTECTED]
>
>





-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to