Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Is the ATTACH DATABASE statement supported
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
yakbuttercandle  
View profile  
 More options Nov 1 2009, 8:01 pm
From: yakbuttercandle <ganesh.ramachandran...@gmail.com>
Date: Sun, 1 Nov 2009 17:01:16 -0800 (PST)
Local: Sun, Nov 1 2009 8:01 pm
Subject: Is the ATTACH DATABASE statement supported
For the life of me, I am not able to get this attach statement to
work: ATTACH DATABASE '/Users/gr/Library/Application\ Support/iPhone\
Simulator/User/Applications/3A5985F2-A114-466E-A169-876B5F72B54A/
Documents/db/ABC.sqlite' as ABC

I suspect the problem may be in the way i'm escaping @" " in the path
to the db I'm trying to attach.

<code>
NSString *escapedPath = [pathToVDb
stringByReplacingOccurrencesOfString:@" " withString:@"\\ "];
    attachStmt = [NSString stringWithFormat:@"ATTACH DATABASE '%@' as
%@",escapedPath, vCode];

NSObject<PLResultSet> *results = [dbase
executeQueryAndReturnError:anError statement:attachStmt];

NSString *pragmaStmt = @"pragma database_list";
        results = [dbase executeQueryAndReturnError:anError
statement:pragmaStmt];
        while ([results next]) {
            NSLog(@"DATABASE LIST: \n");
            NSLog(@" %@ at %@ \n",[results stringForColumn:@"name"],
[results stringForColumn:@"file"]);
        }
</code>

No errors from executeQuery;
Database list only has the main database

The attach statement works (even without escaping spaces in the path)
when I use SQLite Manager Plugin for Firefox (where I issue SQL
statements as opposed to using the Attach Database menu option)

Help!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »