Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Open VFP 5.0 Database directly in VB5
Message
From
22/12/1998 16:12:14
 
 
To
21/12/1998 17:07:19
Sammy Derban
Ghana Telecom
Accra, Ghana
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00169485
Message ID:
00169833
Views:
21
>Hi all,
>
>I'm trying to open a Visual Foxpro 5.0 database in Vb 5.0
> and I get this error message " Data type conversion error".
>Meanwhile I'm able to open a foxpro 2.6 free table table using similar code.
>
>Here a samlpe code;
>
>Dim db1 As Database, rstsupl As Recordset
>Set db1 = OpenDatabase ("c:\POS\DATA\data1", "FoxPro 5.0;")
>Set rstsupl = db1.OpenRecordset("supllier")
>
>supllier is a table in database data1.
>
>I'll appreciate some help.

Sammy,

There is a connection type "Visual Foxpro 3.0" that will open VFP 5.0 databases when using data controls, you can also open via ODBC.

Excuse my examples as I am primarily a VFP developer.

Set DB = DBEngine.Workspaces(0).OpenDatabase("", _
False, False, "ODBC;DSN=VFPConnect;DATABASE=;UID=sa;PWD=;")

Dim qdfValue As QueryDef
Dim rsValue As Recordset

Set qdfValue = DB.CreateQueryDef("")

With qdfValue
.Connect = "ODBC;DSN=VFPConnect;DATABASE=WRIM;UID=sa;PWD=;"
.SQL = cSQLSelect
Set rsValue = .OpenRecordset()
End With
Previous
Reply
Map
View

Click here to load this message in the networking platform