Re: [sqlite] Running sqlite script in Sqlite db using C++

2013-05-14 Thread Simon Slavin
On 14 May 2013, at 1:59pm, Dulini Atapattu wrote: > If anyway I omit these sqlite commands from script, so is there anyway of > providing the script file to API? If you strip out the lines which start with a dot, everything else in the script should be a legitimate

Re: [sqlite] Running sqlite script in Sqlite db using C++

2013-05-14 Thread fnoyanisi
You may want to consider writing a bash/msdos-batch file and do your stuff from your OS command line Bıt C API is quite handy, you can do most of the stuff with it. On 14/05/2013, at 10:29 PM, Dulini Atapattu wrote: > If anyway I omit these sqlite commands from

Re: [sqlite] Running sqlite script in Sqlite db using C++

2013-05-14 Thread Dulini Atapattu
If anyway I omit these sqlite commands from script, so is there anyway of providing the script file to API? On Tue, May 14, 2013 at 6:07 PM, wrote: > If you are dealing with CSV files, there is a simple API I wrote you can > use. > >

Re: [sqlite] Running sqlite script in Sqlite db using C++

2013-05-14 Thread fnoyanisi
If you are dealing with CSV files, there is a simple API I wrote you can use. https://github.com/fnoyanisi/sqlite3_capi_extensions I was looking for .import functionality for C API, but I ended up writing my own fınctions. On 14/05/2013, at 9:39 PM, Richard Hipp wrote: > On

Re: [sqlite] Running sqlite script in Sqlite db using C++

2013-05-14 Thread Richard Hipp
On Tue, May 14, 2013 at 1:53 AM, Dulini Atapattu wrote: > Hi all, > > I have some sqlite scripts with some sqlite commands like: > >- .headers ON >- .mode CSV etc. > > Is there anyway of running this script in SqliteDB using Sqlite interface > for C++, instead

[sqlite] Running sqlite script in Sqlite db using C++

2013-05-14 Thread Dulini Atapattu
Hi all, I have some sqlite scripts with some sqlite commands like: - .headers ON - .mode CSV etc. Is there anyway of running this script in SqliteDB using Sqlite interface for C++, instead of redirecting the file to sqlite using sqlite command line shell? Thanks

Re: [sqlite] running a script?

2006-08-23 Thread Clark Christensen
] Sent: Wednesday, August 23, 2006 1:22:03 PM Subject: Re: [sqlite] running a script? Thanks guys. Does any of this change for Windows though? I don't believe I can use cat or | in the command prompt. I've also tried some of those structures already and there seems to be a problem with my file paths: C

Re: [sqlite] running a script?

2006-08-23 Thread Clay Dowling
John Salerno said: > I'm asking about an actual file, though, not just a single query. I've > tried something like what you suggest with the file path, but it > doesn't work. > sqlite database.db < script.sql > > > On 8/23/06, Scott Baker <[EMAIL PROTECTED]> wrote: >> echo "SELECT * FROM

Re: [sqlite] running a script?

2006-08-23 Thread John Salerno
Thanks guys. Does any of this change for Windows though? I don't believe I can use cat or | in the command prompt. I've also tried some of those structures already and there seems to be a problem with my file paths: C:\name\name\file.ext I don't know if it's the colon or the slashes, but it

Re: [sqlite] running a script?

2006-08-23 Thread Clark Christensen
mands because the SQLite shell includes the trailing semicolon as part of the file or table identifier. -Clark - Original Message From: John Salerno <[EMAIL PROTECTED]> To: sqlite-users@sqlite.org Sent: Wednesday, August 23, 2006 1:01:46 PM Subject: Re: [sqlite] running a script

Re: [sqlite] running a script?

2006-08-23 Thread Ulrich Schöbel
On Wednesday 23 August 2006 21:45, John Salerno wrote: > Hi everyone. Can someone tell me the proper syntax for running a sql > script when starting up sqlite from the command line interface? > > Thanks, > John > > --- >-- To

Re: [sqlite] running a script?

2006-08-23 Thread John Salerno
I'm asking about an actual file, though, not just a single query. I've tried something like what you suggest with the file path, but it doesn't work. On 8/23/06, Scott Baker <[EMAIL PROTECTED]> wrote: echo "SELECT * FROM Table" | sqlite database.bin John Salerno wrote: > Hi everyone. Can

Re: [sqlite] running a script?

2006-08-23 Thread Scott Baker
echo "SELECT * FROM Table" | sqlite database.bin John Salerno wrote: > Hi everyone. Can someone tell me the proper syntax for running a sql > script when starting up sqlite from the command line interface? > > Thanks, > John > >

[sqlite] running a script?

2006-08-23 Thread John Salerno
Hi everyone. Can someone tell me the proper syntax for running a sql script when starting up sqlite from the command line interface? Thanks, John - To unsubscribe, send email to [EMAIL PROTECTED]