Hi all.
Have any of you ever wanted to give a field a default value when creating a new tabe via SQL in Access?
If you have, and have tried the following :- ALTER TABLE myTable Add Column myColumn integer DEFAULT 0
you would know that running this in Access fails.
If you have ever instaciated the DAO engine in Delphi or used controls that uses the DAO engine, i.e. Titan Access in my case, you would know, THIS FAILS !!
 
I searched the web, and found most people say, oh do it in VB and alter the defaultvalue property....great...I am using Delphi.
 
ANYWAY, long story short, if you use ADO.....the above SQL is no problem and works a charm !!!
 
I can create a table in Access via ADO (TADOCommand control) that makes a new field WITH a default value as I want to in the above SQL.
 
Anyway, so now I have it working.....grrr....
 
Jeremy
_______________________________________________
Offtopic mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/offtopic

Reply via email to