Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table definition question for Access 97

Status
Not open for further replies.

kor

Programmer
Mar 15, 2001
27
US
objConn.Execute("CREATE TABLE Users")
objConn.Execute("ALTER TABLE Users ADD COLUMN userID INTEGER UNIQUE")
objConn.Execute("ALTER TABLE Users ADD COLUMN userFirstName VARCHAR[50]")
objConn.Execute("ALTER TABLE Users ADD COLUMN userLastName VARCHAR[50]")
objConn.Execute("ALTER TABLE Users ADD COLUMN userInfo TEXT")

This is a simplified version of my table. The database is Access 97, code is ASP/ADO. What I want to know is how to modify the table with keywords so I can write an insert query with just the name fields and have the userID field auto increment and the userInfo field default to NULL. A sample of that query would be useful as well. Thanks for your help.

Oh, and I'd also like to know how include the field descriptions in the create table command so I don't have to use all these alter table statements. They make my code look less concise.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top