General information
Category:
Database DAO/RDO/ODBC/ADO
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only