At 12:51 03/12/2004 -0600, you wrote:
When The Table is created in code with the following statements
cmd.CommandText = "CREATE TABLE BillingNumbers(id int default 0 not null, " & _
"clecID int default 0 not null, " & _
"ilecID int default 0 not null, " & _
"BillingNumber varchar(20) default "" not null, " & _
"State varchar(20) default "" not null, " & _
"Resale int default 0 not null, " & _
"UNEP int default 0 not null, " & _
"PctDiscount decimal(8,2) default 0 not null)"
...
This Insert statement returns the error "SQL error: no such column: State"
INSERT INTO BillingNumbers (id, clecID, ilecID, BillingNumber, State, Resale, UNEP, PctDiscount) VALUES (15, 2, 0, '318Q802095', 'LA', 1, 0, 0)
I'd suggest using " a few more times; in VB, when you put "" inside a string, it only leaves one ". So the BillingNumber and State columns should be defined thus:
...
"BillingNumber varchar(20) default """" not null, " & _ "State varchar(20) default """" not null, " & _
...
In your code, the State column is not defined; the default string for BillingNumber, OTOH, is defined as "not null,
State varchar(20) default"
Guy

