Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create Fox Databases and Tables
Message
From
17/04/2001 15:34:10
 
 
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00490448
Message ID:
00496319
Views:
8
>>>>>I have created fox free tables in VB but not Database files with tables. Anyone have some ADO code for this?
>>>>
>>>I am in need of a little more help.
>>>
>>>My humble thanks in advance,
>>
>>Joe,
>>
>>This is sample code that creates a free table:
>>Dim oc As ADODB.Connection
>>Set oc = New ADODB.Connection
>>oc.Open "file name=testalter.udl"
>>oc.execute "create table testcreate (single c(10))"
>>oc.close
>>Where testalter.udl contains the following connection string:
>>
>>DSN=TestAlter;UID=;SourceDB=d:\temp;SourceType=DBF;Exclusive=Yes;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;
>>
>>And the 'TestAlter' DSN uses the Visual FoxPro ODBC driver and points to a free table directory. You can do this a number of different ways, for example with ADOX too.
>
>This is almost identicle to the code I use. What I need to be able to do is create a database container. My thoughts are that the SourceType=DBC; is a major part of the puzzle, I just don't know how to put it all together. To create a database with tables (non free).
>
>Any help would be a great boon,

Sorry, I misunderstood the question. The answer is you cannot do it with the current VFP ODBC driver, the CREATE DATABASE command is not supported. You can find out if a regular VFP command has ODBC support by looking at DRVVFP.HLP in your \windir\system32 directory.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform