If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > trying to set default value & validation in new table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-04-04, 05:38
gtubb gtubb is offline
Registered User
 
Join Date: Jan 2004
Posts: 6
trying to set default value & validation in new table

Hi folks

I can create a new Access table with

adSQL = "CREATE TABLE " &_
cNewTable &_
" (Name text (50), Email text (75), Comments text (255), Region text (50), DateUploaded date)"

but can anyone tell me how to set a default value or validation rule for any particular field?

Many thanks

Gerard
Reply With Quote
  #2 (permalink)  
Old 02-04-04, 10:57
Mirador Mirador is offline
Registered User
 
Join Date: Jan 2004
Location: Oslo
Posts: 45
Re: trying to set default value & validation in new table

Hi there..

I'm not sure about the default values, but i know you can do like this to get validationrules for not accepting blanks. (ex : "NOT NULL")

adSQL = "CREATE TABLE " &_
cNewTable &_
" (Name text (50) NOT NULL, Email text (75), Comments text (255), Region text (50), DateUploaded date)"

YOu can altso specify primary key by setting :
(ID char NOT NULL primary key, etc.ec..)


Hope it helps..

PS. I'll fill in if i can find out how to set default values..

Best regards
Mirador.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On