Syntax -Alter table
HI guys, I hope somebody has a suggestion to my problem
I need to alter a table(which I haven't done before) for my app. that is written in Visual Basic 6 using Access database.
I know the "formula" for altering the table,don't require that.
This is the code for creating the table
nErr = myObj.Modify(Handle, "CREATE TABLE LabelsPrinted ( CustomerID INT, PrintedWhen DATETIME, " & _
"DataRecorderCode VARCHAR(30), NumberBoxes INT, FirstBoxNbr VARCHAR(100), RecorderReturnedWhen DATETIME, " & _
"CONSTRAINT FK_CustomerID_001 FOREIGN KEY (CustomerID) REFERENCES CustomerDetails (CustomerID))"
If myObj.ReportError(Handle, nErr, "attempting to update the database. (v" & CStr(lVersion) & "
", App.title) Then
Exit Function
End If
What I am not sure here is what is the way I need to alter this table, how or where do I use the altering formula/syntax to acctually do this, I can seem to write it properly but I am not getting any errors nor is anything getting created.
Thanks
HI guys, I hope somebody has a suggestion to my problem
I need to alter a table(which I haven't done before) for my app. that is written in Visual Basic 6 using Access database.
I know the "formula" for altering the table,don't require that.
This is the code for creating the table
nErr = myObj.Modify(Handle, "CREATE TABLE LabelsPrinted ( CustomerID INT, PrintedWhen DATETIME, " & _
"DataRecorderCode VARCHAR(30), NumberBoxes INT, FirstBoxNbr VARCHAR(100), RecorderReturnedWhen DATETIME, " & _
"CONSTRAINT FK_CustomerID_001 FOREIGN KEY (CustomerID) REFERENCES CustomerDetails (CustomerID))"

If myObj.ReportError(Handle, nErr, "attempting to update the database. (v" & CStr(lVersion) & "

Exit Function
End If
What I am not sure here is what is the way I need to alter this table, how or where do I use the altering formula/syntax to acctually do this, I can seem to write it properly but I am not getting any errors nor is anything getting created.
Thanks