On 13 Feb 2010, at 8:09pm, arunciman wrote:

> So, I created a test database to start learning SQLite. I just ran "sqlite3
> test.db" and then entered "CREATE TABLE hello (world CHAR(50)); INSERT INTO
> hello VALUES ('a','b','c'); SELECT * FROM hello;"
> That worked perfectly in the program. I ran the select again after closing
> to make sure it wrote to the file,

You did again exactly what you wrote above, but without the 'CREATE' and 
'INSERT' commands.  And still got the same output.

Try opening the file with NOTEPAD.EXE or some other simple application.  See if 
it's blank or has some gibberish in including the words 'hello' and 'world'.

> and then I copied the database file to my
> Visual C++ debug folder. I ran it in a little test program that would open
> the database (taken right out of the 5 minute quickstart guide), and it
> opened the file,

If you give SQLite a command to open a database file that doesn't exist, it 
will just create a new one.  It doesn't give an error message.  So use a search 
function on your disk for files with that name.

> but it keeps saying "table hello does not exist." Why is it
> working with sqlite3.exe but not with the libraries?

I think it may not be looking in the directory you think it is.  Perhaps you 
could look in different directories, or you might specify the full path in the 
command that opens the database file.

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

Reply via email to