Re: [sqlite] How to load a SQLite schema from file using SQLite C-API

2005-09-16 Thread Dennis Cote
Rajan, Vivek K wrote: I have SQLite schema in an ascii file. I would like to be able to load this schema via SQLite C-API. How do I do this? Vivek What I do is read my schema file into a large string in memory (I use C++ file stream and string stream classes, so this is fairly easy) and

Re: [sqlite] How to load a SQLite schema from file using SQLite C-API

2005-09-16 Thread Kurt Welgehausen
>I have SQLite schema in an ascii file. I would like to be able to load >this schema via SQLite C-API. How do I do this? You can look at the source code for the SQLite shell and see how it implements the .read command, but it may be simpler just to invoke the SQLite shell using system() or exec().

Re: [sqlite] How to load a SQLite schema from file using SQLite C-API

2005-09-15 Thread Martin Engelschalk
Hello Vivek, Do you have an ascii-File like create table t1 ... create index ... ... **EOF If yes, you can't. But perhaps I have not understood your problem. Martin Rajan, Vivek K schrieb: I have SQLite schema in an ascii file. I would like to be able to load this schema via SQLite C-API.