Sorry I should have said, I'm using these calls in C++ on windows.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Thursday, August 14, 2008 1:45 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Loading a existing database 100% into memory

On Thu, 14 Aug 2008, D. Richard Hipp wrote:

> On Aug 14, 2008, at 4:18 PM, Brown, Daniel wrote:
>
>> Hello Stefan,
>>
>> I'm trying to use the code snippet you suggested but when I try to
>> query
>> the master table of the attached database I get and error with the
>> following message:
>>      "SQL error: no such table: 'test.sqlite_master';
>>
>> I am running the following queries:
>> 1. "ATTACH DATABASE 'data\\test.db' AS test" - this seems to succeed
>> (no
>> error code).
>> 2. "SELECT tbl_name FROM test.sqlite_master' WHERE type = 'table'" -
>> this one is failing.
>>
>
> Works when I try it.
>
> But I'm not running on windows.  Do you really need two backslashes in
> the filename?  Should there be just a single backslash?  You do not
> quote backslashes in SQL strings as you do in C.
>

> But I'm not running on windows.  Do you really need two backslashes in
> the filename?  Should there be just a single backslash?  You do not

Backslashes are illegal in a Windows filenames, except as folder 
delimiters, so "data\\test.db" is not a valid Windows filename. Hence,
if 
this is on Windows, the ATTACH must be failing. It must be
'data\test.db'.

Chris


_______________________________________________
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

Reply via email to