Re: Need help in MS-ACCESS
Alireza Kheyrollahi <[email protected]> Fri, 5 Jul 2002 23:19:04 +0100
| Newsgroups | gmane.comp.windows.devel.vbcom |
|---|---|
| Message-ID | <003b01c22472$ef51c3a0$f76b073e@aliostad> |
Dear Manikandan,
You must reference to ADODB 2.5 and ADOX (Microsoft ADO Ext. 2.5 for DDL and Security) and then write something like this:
'---------------------------------------------------------------
Dim cn As ADODB.Connection
Dim ctg As ADOX.Catalog
Dim s As Property
Dim i As Integer, n As Integer
Dim Prop As Property
Set cn = New ADODB.Connection
Set ctg = New ADOX.Catalog
cn.Open "Provider=Microsoft.Jet.Oledb.4.0;Data Source=c:\db1.mdb"
Set ctg.ActiveConnection = cn
For Each Prop In ctg.Tables("tblTest").Columns("Fname").Properties
If Prop.Name = "Jet OLEDB:Allow Zero Length" Then
Prop.Value = True
End If
Next
'----------------------------------------------------------
Cheers
Ali
----- Original Message -----
From: "P. S. Manikandan" <[email protected]>
To: <[email protected]>
Sent: Friday, July 05, 2002 6:12 AM
Subject: [VBCOM] Need help in MS-ACCESS
> Hi...
> I have an MS-ACCESS table version MS-Office 2000. I want to change
> the properties of every column through vb. For example
>
> I want to set the value for "Allow zero length " property.
>
> please suggest me to do this.
>
> Regards
>
> Manikandan
>
> You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.
>
You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.