Mike Willhite said:
> cmd.CommandText = "CREATE TABLE BillingNumbers(id int default not null,"
> "clecID int default not null, " & _
> "ilecID int default not null, " & _
> "BillingNumber varchar(20) default "" not null, " & _
> "State varchar(20) default "" not null, " & _
> "Resale int default not null, " & _
> "UNEP int default not null, " & _
> "PctDiscount decimal(8,2) default not null)"
Try this instead and you'll see better results:
cmd.CommandText = "CREATE TABLE BillingNumbers (" & vbCrLf _
& "clecID int default 0 not null," & vbCrLf _
& "ilecID int default 0 not null," & vbCrLf _
& "BillingNumber varchar(20) default '' not null," & vbCrLf _
& "State varchar(20) default '' not null," & vbCrLf _
& "Resale int default 0 not null," & vbCrLf _
& "UNEP int default 0 not null," & vbCrLf _
& "PctDiscount decimal(8,2) default 0.00 not null)"
The problem you were experiencing and not seeing is that in Visual Basic,
inside of quotes, "" is not an empty string but a single " character.
Thus you don't have a State fields but a BillingNumber field with a
default value of ' not null State varchar(20) default '. That's probably
not what you expected.
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development