Re: [sqlite] Create a New Database?

2004-04-18 Thread Puneet Kishor
On Apr 18, 2004, at 12:25 PM, Richard wrote:

Hmm, in mysql its not so
ok,
So, if I move the test.db database,
into a another folder called db
Then start sqlite
./sqlite
and do this:
.database /db/
this should show the databases in the db folder?
or did I miss something..

Richard,

It doesn't matter how it is in MySQL. This is SQLite, and this is how 
it is...

assuming test.db is in the same folder as sqlite,

> ./sqlite test.db
. your other commands... ;
assuming test.db is in a different folder, lets say, a folder called 
"db", which is not the same as  sqlite's folder, you can do...

db> sqlite test.db
. your other commands... ;
see what happened above... You didn't type ./sqlite test.db in this 
second scenario because sqlite is in a different folder while you are 
in the db folder. The reason it worked is because the folder where 
sqlite is installed is in the PATH variable. It would be if you 
installed SQlite correctly. If it isn't, then you need to find out a 
good place to put sqlite and its libraries somewhere in your path.

You have to specify the database on the same line as the sqlite command
> sqlite nameofdatabase
or

> ./sqlite nameofdatabase

It can't be any simpler. Just grab a basic Unix book and you will get 
much further faster than our fragmented help on this list. Then, do ask 
SQLite-specific questions here and you will get quick, relevant help.

On Apr 18, 2004, at 10:53 AM, Will Leshner wrote:

On Apr 18, 2004, at 7:42 AM, Richard wrote:

Now all commands should be active,
hence where the database "test.db"
I can see it inside the folder, but sqlite can not see it,
or is there another step I'm missing.
It doesn't work that way. The sqlite command-line tool doesn't look 
for databases in the same "folder" as it. In fact, if you've 
installed it correctly, then sqlite becomes a command-line command 
you can enter anywhere. To examine a sqlite database with the tool, 
you have to pass the name/path of the database when you invoke it.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [sqlite] Create a New Database?

2004-04-18 Thread Richard
Hmm, in mysql its not so
ok,
So, if I move the test.db database,
into a another folder called db
Then start sqlite
./sqlite
and do this:
.database /db/
this should show the databases in the db folder?
or did I miss something..
please note:
using Mac OS X
Thanks
Richard
On Apr 18, 2004, at 10:53 AM, Will Leshner wrote:

On Apr 18, 2004, at 7:42 AM, Richard wrote:

Now all commands should be active,
hence where the database "test.db"
I can see it inside the folder, but sqlite can not see it,
or is there another step I'm missing.
It doesn't work that way. The sqlite command-line tool doesn't look 
for databases in the same "folder" as it. In fact, if you've installed 
it correctly, then sqlite becomes a command-line command you can enter 
anywhere. To examine a sqlite database with the tool, you have to pass 
the name/path of the database when you invoke it.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [sqlite] Create a New Database?

2004-04-18 Thread Will Leshner
On Apr 18, 2004, at 7:42 AM, Richard wrote:

Now all commands should be active,
hence where the database "test.db"
I can see it inside the folder, but sqlite can not see it,
or is there another step I'm missing.
It doesn't work that way. The sqlite command-line tool doesn't look for 
databases in the same "folder" as it. In fact, if you've installed it 
correctly, then sqlite becomes a command-line command you can enter 
anywhere. To examine a sqlite database with the tool, you have to pass 
the name/path of the database when you invoke it.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [sqlite] Create a New Database?

2004-04-18 Thread Richard
Confused,
I thought that .databases command would list all database,
under sqlite? the you can choose which one you wanted to make active.
???
Once I start sqlite correctly,
via the ./sqlite command
Now all commands should be active,
hence where the database "test.db"
I can see it inside the folder, but sqlite can not see it,
or is there another step I'm missing.
Thanks-
Richard
On Apr 18, 2004, at 10:34 AM, Will Leshner wrote:

On Apr 18, 2004, at 7:32 AM, Richard wrote:

Where is the test.db ?
I just made it, how come its not listed under the .databases command.
Because you didn't specify it on the command line when you entered the 
sqlite command:

> ./sqlite test.db

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [sqlite] Create a New Database?

2004-04-18 Thread Will Leshner
On Apr 18, 2004, at 7:32 AM, Richard wrote:

Where is the test.db ?
I just made it, how come its not listed under the .databases command.
Because you didn't specify it on the command line when you entered the 
sqlite command:

> ./sqlite test.db

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [sqlite] Create a New Database?

2004-04-18 Thread Richard
Okay, after all done,
this is what I get when I re-launch sqlite:
G4:/applications/sqlite rnagle$ ./sqlite
SQLite version 2.8.13
Enter ".help" for instructions
sqlite> .databases
0   main
1   temp
sqlite>
Where is the test.db ?
I just made it, how come its not listed under the .databases command.
thanks
Richard


On Apr 18, 2004, at 10:23 AM, Puneet Kishor wrote:

On Apr 18, 2004, at 9:15 AM, Richard wrote:

Well, I may of have spoken too, soon.

G4:/applications/sqlite rnagle$ ls
SQLite ReadMe.pdf   libsqlite.a sqlite 
  sqlite.htest
G4:/applications/sqlite rnagle$ sqlite test.db
-bash: sqlite: command not found
G4:/applications/sqlite rnagle$ sqlite test.db
-bash: sqlite: command not found
G4:/applications/sqlite rnagle$

as you can see from the terminal prompt, I was in he sqlite directory,
and type the command, but could not launch app.
you need to type
> ./sqlite test.db
for security reasons, by default, the current directory is not in the  
path in Unix-based computers.

Perhaps getting a book on learning Unix would be a worthwhile pursuit.  
I may be incorrect, but it might be possible that you are using a Mac  
(I am assuming so from your "G4" prompt). There is a new O'Reilly book  
out on Unix of Mac OS X users (I forget the exact title). Most of  
their books are really nice, so that will be a really neat investment.

Thanks-
Richard
On Apr 18, 2004, at 10:03 AM, Yves Glodt wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Sunday 18 April 2004 15:56, Richard wrote:
I think,
the problem is that, I did do that,
sqlite test.db
and did not get a correct reply...
Hence, wondering if I'm did right..

Inside the SQLITE folder, is the following:
libsqlite.a
sqlite
sqlite readme.pdf
sqlite.h
I been clicking on ssqlite, which is the a unix exe file.
and it brings up a terminal window with sqlite,
If you start sqlite by clicking on it, you have no possibility to  
give a
command-line parameter.

You must open a terminal window, then cd to the place you have sqlite
installed, and then type:
sqlite test.db
then you will get the prompt as you describe below, with the  
difference
that a new database called test.db has been created.

running...

sqlite>   # this is the prompt I see,
now what do I enter in?
e.g. enter sql commands to create tables or query them. See my first
reply to have an example
Thanks-
Richard
On Apr 18, 2004, at 3:59 AM, Yves Glodt wrote:
A new database is created when u call sqlite.exe with a filename as
parameter. Of course only if this file does not yet exist... e.g.:
~$ sqlite test.db
SQLite version 2.8.13
Enter ".help" for instructions
sqlite> create table testtable (
   ...> id integer,
   ...> name varchar(64)
   ...> );
sqlite> insert into testtable values (1,'Joe');
sqlite> select * from testtable;
1|Joe
sqlite>.q
~$
 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
- --
Linux 2.4.26 #4 Wed Apr 14 19:23:19 CEST 2004 i686
 15:59:29 up  3:27,  1 user,  load average: 0.46, 0.42, 0.29
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAgorMfmxiTOp0sQYRAtxBAJ0XlssCbxMvBVNB505tINyWvhJDGwCeILcz
vZJDSwf17qrw+59y7UA1cl4=
=DmI0
-END PGP SIGNATURE-
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [sqlite] Create a New Database?

2004-04-18 Thread Peter
Richard wrote:
G4:/applications/sqlite rnagle$ sqlite test.db
-bash: sqlite: command not found
Hehe, take it you're new to OSX (I think) unix like intricacicies.

Should you not type:
./sqlite test.db
as you've probably got a setting somewhere to search system paths for 
binaries not including the current directory.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [sqlite] Create a New Database?

2004-04-18 Thread Puneet Kishor
On Apr 18, 2004, at 9:15 AM, Richard wrote:

Well, I may of have spoken too, soon.

G4:/applications/sqlite rnagle$ ls
SQLite ReadMe.pdf   libsqlite.a sqlite 
 sqlite.htest
G4:/applications/sqlite rnagle$ sqlite test.db
-bash: sqlite: command not found
G4:/applications/sqlite rnagle$ sqlite test.db
-bash: sqlite: command not found
G4:/applications/sqlite rnagle$

as you can see from the terminal prompt, I was in he sqlite directory,
and type the command, but could not launch app.
you need to type
> ./sqlite test.db
for security reasons, by default, the current directory is not in the 
path in Unix-based computers.

Perhaps getting a book on learning Unix would be a worthwhile pursuit. 
I may be incorrect, but it might be possible that you are using a Mac 
(I am assuming so from your "G4" prompt). There is a new O'Reilly book 
out on Unix of Mac OS X users (I forget the exact title). Most of their 
books are really nice, so that will be a really neat investment.

Thanks-
Richard
On Apr 18, 2004, at 10:03 AM, Yves Glodt wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Sunday 18 April 2004 15:56, Richard wrote:
I think,
the problem is that, I did do that,
sqlite test.db
and did not get a correct reply...
Hence, wondering if I'm did right..

Inside the SQLITE folder, is the following:
libsqlite.a
sqlite
sqlite readme.pdf
sqlite.h
I been clicking on ssqlite, which is the a unix exe file.
and it brings up a terminal window with sqlite,
If you start sqlite by clicking on it, you have no possibility to 
give a
command-line parameter.

You must open a terminal window, then cd to the place you have sqlite
installed, and then type:
sqlite test.db
then you will get the prompt as you describe below, with the 
difference
that a new database called test.db has been created.

running...

sqlite>   # this is the prompt I see,
now what do I enter in?
e.g. enter sql commands to create tables or query them. See my first
reply to have an example
Thanks-
Richard
On Apr 18, 2004, at 3:59 AM, Yves Glodt wrote:
A new database is created when u call sqlite.exe with a filename as
parameter. Of course only if this file does not yet exist... e.g.:
~$ sqlite test.db
SQLite version 2.8.13
Enter ".help" for instructions
sqlite> create table testtable (
   ...> id integer,
   ...> name varchar(64)
   ...> );
sqlite> insert into testtable values (1,'Joe');
sqlite> select * from testtable;
1|Joe
sqlite>.q
~$
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
- --
Linux 2.4.26 #4 Wed Apr 14 19:23:19 CEST 2004 i686
 15:59:29 up  3:27,  1 user,  load average: 0.46, 0.42, 0.29
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAgorMfmxiTOp0sQYRAtxBAJ0XlssCbxMvBVNB505tINyWvhJDGwCeILcz
vZJDSwf17qrw+59y7UA1cl4=
=DmI0
-END PGP SIGNATURE-
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [sqlite] Create a New Database?

2004-04-18 Thread Puneet Kishor
On Apr 18, 2004, at 8:56 AM, Richard wrote:

I think,
the problem is that, I did do that,
sqlite test.db
and did not get a correct reply...
Hence, wondering if I'm did right..

Inside the SQLITE folder, is the following:
libsqlite.a
sqlite
sqlite readme.pdf
sqlite.h
I been clicking on ssqlite, which is the a unix exe file.
and it brings up a terminal window with sqlite, running...
sqlite>   # this is the prompt I see,
now what do I enter in?
you are saying you did type
> sqlite test.db
but then you go on to say that you "clicked" on ssqlite (sic)... I am 
assuming you mean you clicked on sqlite (the unix binary... there is no 
concept of exe file in unix... a binary could be an "exe" file).

So, which one of the above did you do?

The act of clicking on sqlite would be equivalent to typing
> sqlite
without any database specified. That won't work.

Do as Yves suggests below. It will work. You have to specify the 
database when launching sqlite. Once you specify the database (it will 
be created if it doesn't already exist), then you can create your 
tables and whatnot.

On Apr 18, 2004, at 3:59 AM, Yves Glodt wrote:

A new database is created when u call sqlite.exe with a filename as
parameter. Of course only if this file does not yet exist... e.g.:
~$ sqlite test.db
SQLite version 2.8.13
Enter ".help" for instructions
sqlite> create table testtable (
   ...> id integer,
   ...> name varchar(64)
   ...> );
sqlite> insert into testtable values (1,'Joe');
sqlite> select * from testtable;
1|Joe
sqlite>.q
~$


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [sqlite] Create a New Database?

2004-04-18 Thread Richard
Well, I may of have spoken too, soon.

G4:/applications/sqlite rnagle$ ls
SQLite ReadMe.pdf   libsqlite.a sqlite  
sqlite.htest
G4:/applications/sqlite rnagle$ sqlite test.db
-bash: sqlite: command not found
G4:/applications/sqlite rnagle$ sqlite test.db
-bash: sqlite: command not found
G4:/applications/sqlite rnagle$

as you can see from the terminal prompt, I was in he sqlite directory,
and type the command, but could not launch app.
Now what?

Thanks-
Richard
On Apr 18, 2004, at 10:03 AM, Yves Glodt wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Sunday 18 April 2004 15:56, Richard wrote:
I think,
the problem is that, I did do that,
sqlite test.db
and did not get a correct reply...
Hence, wondering if I'm did right..

Inside the SQLITE folder, is the following:
libsqlite.a
sqlite
sqlite readme.pdf
sqlite.h
I been clicking on ssqlite, which is the a unix exe file.
and it brings up a terminal window with sqlite,
If you start sqlite by clicking on it, you have no possibility to give 
a
command-line parameter.

You must open a terminal window, then cd to the place you have sqlite
installed, and then type:
sqlite test.db
then you will get the prompt as you describe below, with the difference
that a new database called test.db has been created.
running...

sqlite>   # this is the prompt I see,
now what do I enter in?
e.g. enter sql commands to create tables or query them. See my first
reply to have an example
Thanks-
Richard
On Apr 18, 2004, at 3:59 AM, Yves Glodt wrote:
A new database is created when u call sqlite.exe with a filename as
parameter. Of course only if this file does not yet exist... e.g.:
~$ sqlite test.db
SQLite version 2.8.13
Enter ".help" for instructions
sqlite> create table testtable (
   ...> id integer,
   ...> name varchar(64)
   ...> );
sqlite> insert into testtable values (1,'Joe');
sqlite> select * from testtable;
1|Joe
sqlite>.q
~$
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
- --
Linux 2.4.26 #4 Wed Apr 14 19:23:19 CEST 2004 i686
 15:59:29 up  3:27,  1 user,  load average: 0.46, 0.42, 0.29
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAgorMfmxiTOp0sQYRAtxBAJ0XlssCbxMvBVNB505tINyWvhJDGwCeILcz
vZJDSwf17qrw+59y7UA1cl4=
=DmI0
-END PGP SIGNATURE-
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [sqlite] Create a New Database?

2004-04-18 Thread Yves Glodt
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sunday 18 April 2004 15:56, Richard wrote:
> I think,
> the problem is that, I did do that,
> sqlite test.db
> and did not get a correct reply...
>
> Hence, wondering if I'm did right..
>
> Inside the SQLITE folder, is the following:
>   libsqlite.a
>   sqlite
>   sqlite readme.pdf
>   sqlite.h
>
> I been clicking on ssqlite, which is the a unix exe file.
> and it brings up a terminal window with sqlite,

If you start sqlite by clicking on it, you have no possibility to give a 
command-line parameter.

You must open a terminal window, then cd to the place you have sqlite 
installed, and then type:
sqlite test.db

then you will get the prompt as you describe below, with the difference 
that a new database called test.db has been created.

> running... 
>
> sqlite>   # this is the prompt I see,
> now what do I enter in?

e.g. enter sql commands to create tables or query them. See my first 
reply to have an example

> Thanks-
> Richard
>
> On Apr 18, 2004, at 3:59 AM, Yves Glodt wrote:
> > A new database is created when u call sqlite.exe with a filename as
> > parameter. Of course only if this file does not yet exist... e.g.:
> >
> > ~$ sqlite test.db
> > SQLite version 2.8.13
> > Enter ".help" for instructions
> > sqlite> create table testtable (
> >...> id integer,
> >...> name varchar(64)
> >...> );
> > sqlite> insert into testtable values (1,'Joe');
> > sqlite> select * from testtable;
> > 1|Joe
> > sqlite>.q
> > ~$
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

- -- 
Linux 2.4.26 #4 Wed Apr 14 19:23:19 CEST 2004 i686
 15:59:29 up  3:27,  1 user,  load average: 0.46, 0.42, 0.29
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAgorMfmxiTOp0sQYRAtxBAJ0XlssCbxMvBVNB505tINyWvhJDGwCeILcz
vZJDSwf17qrw+59y7UA1cl4=
=DmI0
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [sqlite] Create a New Database?

2004-04-18 Thread Richard
I think,
the problem is that, I did do that,
sqlite test.db
and did not get a correct reply...
Hence, wondering if I'm did right..

Inside the SQLITE folder, is the following:
libsqlite.a
sqlite
sqlite readme.pdf
sqlite.h
I been clicking on ssqlite, which is the a unix exe file.
and it brings up a terminal window with sqlite, running...
sqlite>   # this is the prompt I see,
now what do I enter in?
Thanks-
Richard
On Apr 18, 2004, at 3:59 AM, Yves Glodt wrote:

A new database is created when u call sqlite.exe with a filename as
parameter. Of course only if this file does not yet exist... e.g.:
~$ sqlite test.db
SQLite version 2.8.13
Enter ".help" for instructions
sqlite> create table testtable (
   ...> id integer,
   ...> name varchar(64)
   ...> );
sqlite> insert into testtable values (1,'Joe');
sqlite> select * from testtable;
1|Joe
sqlite>.q
~$


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [sqlite] Create a New Database?

2004-04-18 Thread Yves Glodt
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sunday 18 April 2004 08:32, Richard wrote:
> Okay,
> Newbie...
>
> When into SQlite folder,
> and click on terminal window app,
> and launch program...
>
> did a .database,
> shows
> 0 main
> 1 temp
>
> How does one create a new database...?
> tried:
> Create database contact;
> nope.

A new database is created when u call sqlite.exe with a filename as 
parameter. Of course only if this file does not yet exist... e.g.:

~$ sqlite test.db
SQLite version 2.8.13
Enter ".help" for instructions
sqlite> create table testtable (
   ...> id integer,
   ...> name varchar(64)
   ...> );
sqlite> insert into testtable values (1,'Joe');
sqlite> select * from testtable;
1|Joe
sqlite>.q
~$

Find more information here: http://www.sqlite.org/sqlite.html

enjoy, and best regards,
Yves


> Thanks-
> Rick
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

- -- 
Linux 2.4.26 #4 Wed Apr 14 19:23:19 CEST 2004 i686
 09:52:07 up 8 min,  1 user,  load average: 0.08, 0.23, 0.13
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAgjVffmxiTOp0sQYRAhnpAJ9/fpzyn8/L34dNtaPfLUNENGil2ACeMm0a
mWfFhG08tyiZRCQOwHyyoQ0=
=NBC6
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[sqlite] Create a New Database?

2004-04-17 Thread Richard
Okay,
Newbie...
When into SQlite folder,
and click on terminal window app,
and launch program...
did a .database,
shows
0 main
1 temp
How does one create a new database...?
tried:
Create database contact;
nope.
Thanks-
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]