Re: [sqlite] a problem trying to invoke sqlite3 commands from a C application

2007-03-19 Thread Dan Kennedy
On Tue, 2007-03-20 at 02:44 +0200, Rafi Cohen wrote:
> Hi, I'm calling system from a C application in order to invoke sqlite3
> database, then continue with commands: .separator "," and .import file
> table, all in a single string as argument to system.
> sqlite3 is indeed invoked with the correct database, but the problem is
> that the .import command is reported as part of .separator argument.
> There is just a blank between the 2 commands. Should there be a
> different separation betrween the 2 commands?

You probably need a newline following each individual dot-command:

  ".import file tbl\n.dump"


Dan.



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



[sqlite] a problem trying to invoke sqlite3 commands from a C application

2007-03-19 Thread Rafi Cohen
Hi, I'm calling system from a C application in order to invoke sqlite3
database, then continue with commands: .separator "," and .import file
table, all in a single string as argument to system.
sqlite3 is indeed invoked with the correct database, but the problem is
that the .import command is reported as part of .separator argument.
There is just a blank between the 2 commands. Should there be a
different separation betrween the 2 commands? May they be executed one
after the other in a single call to system or should I call system twice
for each command?
Thanks, Rafi.