Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Foxpro table creation in VB
Message
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00291969
Message ID:
00292571
Views:
24
ADOX is a special part of ADO that allows full access to table creation, structure modifications, and index maintenance.
In your VB Project, click Project..references, and check
Microsoft ADO Ext 2.1 For DLL and Security

Nobody makes a true OLEDB driver for VFP (yet), so you can't use native ADOX
to create the table. You can use the SQL passthough code though.

>>Joe,
>>MSFT is supposedly working on a true OLEDB provider for VFP. ADOX has built in functionality to create tables, but you need a true OLE DB provider, not the generic ODBC driver. For example, the following code will create a VFP table with a true OLE DB provider:
>>
>>Dim table As New Table
>>Dim catalog As New ADOX.Catalog
>>
>>catalog.ActiveConnection = "Driver=Microsoft Visual Foxpro Driver;UID=;SourceType=DBF;Deleted=YES;Null=NO;SourceDB=E:\DEV\VISUALMM\DATA"
>> catalog.open
>> table.Name = "MyTable"
>> table.Columns.Append "Column1", adInteger
>> table.Columns.Append "Column2", adInteger
>> table.Columns.Append "Column3", adVarWChar, 50
>>
>> catalog.tables.append tbl ' OK for OLEDB-Will generate error w/ODBC driver
>>
>>>Anyone programmaticly created a foxpro table using VB? I could use some pointers. :)
>>>
>>>My Humble thanks in advance.
>
>Which referance object under project defines "Table"? How would I know if I have the true OLE DB driver. If I dont have it where would I get it from.
Previous
Reply
Map
View

Click here to load this message in the networking platform