Author |
Topic  |
|
MasterFraud
Starting Member
8 Posts |
Posted - 22 March 2001 : 00:07:20
|
hello
I wondering if anyone could help me with my SQL statement I have - I was wanting to create table within a Access Database from a SQL statement in a script eg like below
SQL1 = "CREATE TABLE SomeTable" SQL1 = SQL1 &"(Id autoincrement PRIMARY KEY," SQL1 = SQL1 &"Script_Build char(50)," SQL1 = SQL1 &"Last_Update_Num char(100)," SQL1 = SQL1 &"Approved ?????????
The thing I need to know is if I want the Approved Column (the line in bold) to be a Yes/No format , what term do I use (eg for the key column I would use PRIMARY KEY)
Does anyone know or could point me to a site Any help would be great
Adam Ware
Aware@bigpond.net.au
|
|
davemaxwell
Access 2000 Support Moderator
    
USA
3020 Posts |
Posted - 22 March 2001 : 06:44:42
|
Try BOOLEAN
Dave Maxwell -------------- Proud to be a "World Class" Knucklehead |
 |
|
MasterFraud
Starting Member
8 Posts |
Posted - 22 March 2001 : 10:07:04
|
All I get is an error "Microsoft][ODBC Microsoft Access Driver] Syntax error in field definition. "
I tryed it with this SQL
SQL2 = "CREATE TABLE Sometable (SomeField BOOLEAN)"
Is that right ?
|
 |
|
davemaxwell
Access 2000 Support Moderator
    
USA
3020 Posts |
Posted - 22 March 2001 : 11:04:39
|
I thought Boolean would work ...when I look at how a table is defined in access, it's listed as a YES/NO, so maybe that would work
Dave Maxwell -------------- Proud to be a "World Class" Knucklehead |
 |
|
Doug G
Support Moderator
    
USA
6493 Posts |
Posted - 22 March 2001 : 15:01:53
|
From MS docs, for the Jet 4.0 OLEDB provider, I don't know if this info applies to the older ODBC driver
The following CREATE TABLE statement shows the different synonyms that can be used to create the BOOLEAN data type through the Jet OLE DB provider and ADO.
CREATE TABLE tblUIBooleanDataTypes ( Field1_BIT BIT, Field2_LOGICAL LOGICAL, Field3_LOGICAL1 LOGICAL1, Field4_YESNO YESNO)
====== Doug G ====== |
 |
|
MasterFraud
Starting Member
8 Posts |
Posted - 23 March 2001 : 01:57:58
|
Thankyou, Thankyou >>>I could Kiss you ...
It works well. Where abouts did you find the Docs for that Doug ? It is hidden somewhere in Windows?
I think I need a copy of that!
|
 |
|
Doug G
Support Moderator
    
USA
6493 Posts |
|
|
Topic  |
|