Board index » delphi » How set "Allow Zero Length" property?

How set "Allow Zero Length" property?

Hi I use D5 with ADOExpress on MSAccess2K Database.
I know how to create a MDB file using ADOX, but I don't know how to make
sure
that the fields have the "Allow Zero Length" (as settable in MS Access)
enabled.
(If possible write me a little code for to do this).

Thanks in advance for your help!

Renzo Contarini

 

Re:How set "Allow Zero Length" property?


Hi Renzo,

You can assign this property by using the properties of the column object in
ADOX.
The property you mention (Allow Zero Length) is a specific property of the
Jet 4.0 OLEDB provider.
Assuming your column is named "Col1", you can use this code:
  Col1.Properties['Jet OLEDB:Allow Zero Length'].Value := True;
But apparently you can access (and set) the properties of the column only
after the table has been created, otherwise you get an error.
Here you have a reference of the properties supported by the Jet 4.0 OLEDB
provider
http://msdn.microsoft.com/library/psdk/dasdk/migr42n6.htm

Thrse

"Renzo Contarini" <rco...@sierrasoft.com> a crit dans le message news:
888dab$h...@bornews.borland.com...

Quote
> Hi I use D5 with ADOExpress on MSAccess2K Database.
> I know how to create a MDB file using ADOX, but I don't know how to make
> sure
> that the fields have the "Allow Zero Length" (as settable in MS Access)
> enabled.
> (If possible write me a little code for to do this).

> Thanks in advance for your help!

> Renzo Contarini

Other Threads