 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Ben Guest
|
Posted: Tue Apr 25, 2006 11:12 pm Post subject: SQL CREATE TABLE ERROR |
|
|
Hi,
Im trying to create a table in an access database using java. When I
used "CREATE TABLE tblTable (time number)" it works fine. However when
I try "CREATE TABLE tblTable (time number, to_place number)" I get the
following error.
ERROR: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]
Syntax error in field definition.
What am I doing wrong? Also, what is the datatype in SQL for number:
Long Integer and Memo.
Thanks.
Ben. |
|
| Back to top |
|
 |
Bjorn Abelli Guest
|
Posted: Wed Apr 26, 2006 3:12 am Post subject: Re: SQL CREATE TABLE ERROR |
|
|
"Ben" wrote...
| Quote: | Im trying to create a table in an access database using java.
When I used "CREATE TABLE tblTable (time number)" it works fine.
|
It shouldn't, as TIME is a reserved word.
Look again at your script, as you probably spelled it just a little bit
differently...
| Quote: | What am I doing wrong?
Also, what is the datatype in SQL for number:
|
Using "Number" as datatype from SQL gives a "Double" in Access.
| Quote: | Long Integer and Memo.
|
To create such fields in Access from Java, you can use the types:
"Integer" and "Memo" respectively...
// Bjorn A
Inviato da X-Privat.Org - Registrazione gratuita http://www.x-privat.org/join.php |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|