[sqlite] Creating SQLite database from other databases

2011-09-13 Thread Anthony Scarpelli
I was wondering if there is a good way to create SQLite databases from either SQL Server or FoxPro? Thanks. CONFIDENTIALITY NOTICE: This email message, including any attachments, is for the use of the intended recipient(s) only and may contain information that is privileged, confidential,

Re: [sqlite] Creating a database with a script or SQLite command

2011-08-30 Thread Ivan Shmakov
> Pete Helgren writes: > I may end up going this direction, at the moment I am not having much > luck with the conditional copy in Busybox. Your suggestion: > cp -n newdatabase.db /data/newdatabase.db > Isn't supported in the version of Busybox that I am running. Also > the script

Re: [sqlite] Creating a database with a script or SQLite command

2011-08-30 Thread Simon Slavin
On 31 Aug 2011, at 3:53am, Pete Helgren wrote: > I may end up going this direction, at the moment I am not having much luck > with the conditional copy in Busybox. Your suggestion: > > cp -n newdatabase.db /data/newdatabase.db > > Isn't supported in the version of Busybox that I am running.

Re: [sqlite] Creating a database with a script or SQLite command

2011-08-30 Thread Jay A. Kreibich
On Tue, Aug 30, 2011 at 08:29:06PM -0600, Pete Helgren scratched on the wall: > The only issue I had was finding an example of how I could do all of > what you describe below in bash script. For example, if I put this > in a script: > > sqlite3 newdatabase.db > > and save that as createdb.sh

Re: [sqlite] Creating a database with a script or SQLite command

2011-08-30 Thread Pete Helgren
I may end up going this direction, at the moment I am not having much luck with the conditional copy in Busybox. Your suggestion: cp -n newdatabase.db /data/newdatabase.db Isn't supported in the version of Busybox that I am running. Also the script example I tried: if [ -f

Re: [sqlite] Creating a database with a script or SQLite command

2011-08-30 Thread Pete Helgren
The only issue I had was finding an example of how I could do all of what you describe below in bash script. For example, if I put this in a script: sqlite3 newdatabase.db and save that as createdb.sh and execute it then the script never completes because SQLite is at the sqlite> prompt,

Re: [sqlite] Creating a database with a script or SQLite command

2011-08-30 Thread Jay A. Kreibich
On Tue, Aug 30, 2011 at 09:54:21PM -0400, Igor Tandetnik scratched on the wall: > Pete Helgren wrote: > > I have a need to create a database if it doesn't already exist. The > > obvious solution is to just use: > > > > sqlite3 newdatabase.db > > > > Except that it not only

Re: [sqlite] Creating a database with a script or SQLite command

2011-08-30 Thread Simon Slavin
Forgot to mention: copying an existing database file also lets you set up the file the way you want without having to issue separate commands. For instance, you could create blank tables. Or set a specific page size. Or include some sort of DRM or security check in the 'blank' file. Simon.

Re: [sqlite] Creating a database with a script or SQLite command

2011-08-30 Thread Simon Slavin
On 31 Aug 2011, at 2:53am, Pete Helgren wrote: > Thanks. I'll add a little more info > > This script is used to set up the initial DB in a programmable device that > will then record data to the database and the database should never be > replaced. So I just figured there would be a

Re: [sqlite] Creating a database with a script or SQLite command

2011-08-30 Thread Igor Tandetnik
Pete Helgren wrote: > I have a need to create a database if it doesn't already exist. The > obvious solution is to just use: > > sqlite3 newdatabase.db > > Except that it not only creates the db but also opens that db for > commands. I am running this from a script so I want

Re: [sqlite] Creating a database with a script or SQLite command

2011-08-30 Thread Pete Helgren
Thanks. I'll add a little more info This script is used to set up the initial DB in a programmable device that will then record data to the database and the database should never be replaced. So I just figured there would be a simple way to issue the sqlite commands in script. Even

Re: [sqlite] Creating a database with a script or SQLite command

2011-08-30 Thread Simon Slavin
On 31 Aug 2011, at 2:36am, Pete Helgren wrote: > I have a need to create a database if it doesn't already exist. The obvious > solution is to just use: > > sqlite3 newdatabase.db > > Except that it not only creates the db but also opens that db for commands. Make yourself an empty database

[sqlite] Creating a database with a script or SQLite command

2011-08-30 Thread Pete Helgren
I have a need to create a database if it doesn't already exist. The obvious solution is to just use: sqlite3 newdatabase.db Except that it not only creates the db but also opens that db for commands. I am running this from a script so I want to just want to run the command from a script so

[sqlite] creating a database

2010-11-30 Thread john darnell
Okay, I seem to have figured it out. One needs to create the database and then add a table before the database will be created. Sorry for the baby steps. R, John A.M. Darnell Senior Programmer Walsworth Publishing Company Brookfield, MO John may also be reached at

Re: [sqlite] Creating a database.

2010-11-30 Thread Jay A. Kreibich
On Tue, Nov 30, 2010 at 10:40:52AM -0600, john darnell scratched on the wall: > I know this is a fundamental question, but in the book I'm using to > learn SQLite, there is no reference that I can find for what one needs > to do to create a database. I thought that simply using a CREATE >

[sqlite] Creating a database.

2010-11-30 Thread john darnell
I know this is a fundamental question, but in the book I'm using to learn SQLite, there is no reference that I can find for what one needs to do to create a database. I thought that simply using a CREATE statement with a database name included might do the trick, but alas it does not. I went

Re: [sqlite] Creating a Database from RealBasic code

2008-04-22 Thread Thomas E. Wright
Thanks Denis. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Denis Crowther Sent: Tuesday, April 22, 2008 10:54 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Creating a Database from RealBasic code Hi Thomas, No need to shell out

Re: [sqlite] Creating a Database from RealBasic code

2008-04-22 Thread Denis Crowther
Hi Thomas, No need to shell out, you create from within the realbasic application. I'll pluck some example code and email it to you. Regards Denis On 04/23/2008 12:44 AM, Thomas E. Wright wrote: > This should be simple but does anyone know how to create a new database from > within realbasic

[sqlite] Creating a Database from RealBasic code

2008-04-22 Thread Thomas E. Wright
This should be simple but does anyone know how to create a new database from within realbasic code? I try to shell out using the shell command but it's not liking that too much and there seems to be no create database function for sqlite. Dim s As Shell s= New Shell f = GetFolderItem("")

Re: [sqlite] Creating a database from inside a program

2007-01-02 Thread Dennis Cote
Rob Richardson wrote: So, I thought I could just issue the following command from inside my program: Sqlite3 newdatabase.db .read schemafile.txt But, when I issue this command from the DOS prompt, it gives me an error message saying that there is no command named "read". Rob, You

Re: [sqlite] Creating a database from inside a program

2006-12-29 Thread Ken
I have a nice solution that really works well, at least from C... 1. Create a template Database. (using whatever method you like, either embedded in your code or via sqlite3). 2. Copy the database to a new file, using plane old cp, copy, or if you like an in code copy using open,

Re: [sqlite] Creating a database from inside a program

2006-12-29 Thread Kees Nuyt
On Fri, 29 Dec 2006 12:33:46 -0500, you wrote: > Sqlite3 newdatabase.db .read schemafile.txt > > But, when I issue this command from the DOS prompt, > it gives me an error message saying that there > is no command named "read". Try input redirection: Sqlite3 newdatabase.db

Re: [sqlite] Creating a database from inside a program

2006-12-29 Thread Clay Dowling
Open the database as per normal with sqlite3_open(). Then issue the SQL commands necessary to create your schema. I have a nice little utility I wrote which will take an SQLite schema dump and convert it to an array of C strings that you can issue in sequence (and thanks to Microsoft for the

[sqlite] Creating a database from inside a program

2006-12-29 Thread Rob Richardson
Greetings! I need to be able to create a database with a known schema from inside a program. I used sqlite3.exe's .schema command to export the SQL needed to create the schema for my new database. I can create the database by the following steps: C:\: sqlite3 newdatabase.db Sqlite3>

Re: [sqlite] Creating a database

2006-05-10 Thread Anders Persson
To be more clearer the OPEN commad makes a database if it is missing // Anders Anders Persson skrev: I am using the C api and here a database i created if it dosen't exist. // Anders John Newby skrev: Hi, I know how to create a databse from a DOS prompt by going to the directory the .exe file

Re: [sqlite] Creating a database

2006-05-10 Thread Anders Persson
I am using the C api and here a database i created if it dosen't exist. // Anders John Newby skrev: Hi, I know how to create a databse from a DOS prompt by going to the directory the .exe file is and by typing sqlite3 name.db which then creates the database, but what I do not know is how to

[sqlite] Creating a database

2006-05-10 Thread John Newby
Hi, I know how to create a databse from a DOS prompt by going to the directory the .exe file is and by typing sqlite3 name.db which then creates the database, but what I do not know is how to create a database from my application I am building using VB.Net using the .dll file, I can successfully

[sqlite] Can i use the command line tools--"sqlite" creating a database file ?

2004-09-23 Thread duyu
-