wilsonf1 Posted April 22, 2009 Share Posted April 22, 2009 In asp i am creating tables inside an access DB no problem:"file_name text(100), " & _"template text(50), " & _"meta_title text(70)," & _the above is fine - but i need a numeric/bit field with a default value of 1 for my site map column - how do you do it? ive tried so many syntax's with errors:"site_map integer NOT NULL default 1, " & "site_map numeric NOT NULL default '1', " & HELP!!! Link to comment Share on other sites More sharing options...
justsomeguy Posted April 23, 2009 Share Posted April 23, 2009 Did you check the Access documentation to see which field types you're allowed to use and what the syntax is? That will probably work better than guessing. Link to comment Share on other sites More sharing options...
wilsonf1 Posted April 23, 2009 Author Share Posted April 23, 2009 hmmm nothing in the access help about default value - would that mean its not possible then?SyntaxCREATE [TEMPORARY] TABLE table (field1 type [(size)] [NOT NULL] [WITH COMPRESSION | WITH COMP] [index1] [, field2 type [(size)] [NOT NULL] [index2] [, ...]] [, CONSTRAINT multifieldindex [, ...]])The CREATE TABLE statement has these parts:Part Description table The name of the table to be created. field1, field2 The name of field or fields to be created in the new table. You must create at least one field. type The data type of field in the new table. size The field size in characters (Text and Binary fields only). index1, index2 A CONSTRAINT clause defining a single-field index. multifieldindex A CONSTRAINT clause defining a multiple-field index. Link to comment Share on other sites More sharing options...
justsomeguy Posted April 23, 2009 Share Posted April 23, 2009 I don't see anything about setting a default, I'm not sure if it's possible or not in Access. I haven't used Access in 7 or 8 years, I'm not sure what is allowed in the SQL statements. You should be able to set a default using the GUI though, if I remember correctly. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.