kuzub
asked on
Connect to Paradox database from VB.
It is necessary to me to work with a database 'Paradox' from VB 6.0 and ADO.
What connection string me need for it?
What connection string me need for it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Courtesy of Dave_Greene
ADO Connection Strings
http://www.able-consulting.com/ADO_Conn.htm#RDSConnectProperty
ODBC Driver for Paradox
oConn.Open "Driver={Microsoft Paradox Driver (*.db)};" & _
"DriverID=538;" & _
"Fil=Paradox 5.X;" & _
"DefaultDir=c:\dbpath\;" & _
"Dbq=c:\dbpath\;" & _
"CollatingSequence=ASCII;"
ADO Connection Strings
http://www.able-consulting.com/ADO_Conn.htm#RDSConnectProperty
ODBC Driver for Paradox
oConn.Open "Driver={Microsoft Paradox Driver (*.db)};" & _
"DriverID=538;" & _
"Fil=Paradox 5.X;" & _
"DefaultDir=c:\dbpath\;" & _
"Dbq=c:\dbpath\;" & _
"CollatingSequence=ASCII;"
For the jet Engine use:
<----- Code Begin ----->
Sub OpenParadox(strDBPath As String)
Dim cnnDB As ADODB.Connection
Set cnnDB = New ADODB.Connection
' Specify Paradox by using the Extended Properties
' Paradox 3.x
' Paradox 4.x
' Paradox 5.x
With cnnDB
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Properties("Extended Properties") = "Paradox 5.x"
.Open strDBPath
Debug.Print .ConnectionString
.Close
End With
Set cnnDB = Nothing
End Sub
<----- Code Begin ----->
<----- Code Begin ----->
Sub OpenParadox(strDBPath As String)
Dim cnnDB As ADODB.Connection
Set cnnDB = New ADODB.Connection
' Specify Paradox by using the Extended Properties
' Paradox 3.x
' Paradox 4.x
' Paradox 5.x
With cnnDB
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Properties("Extended Properties") = "Paradox 5.x"
.Open strDBPath
Debug.Print .ConnectionString
.Close
End With
Set cnnDB = Nothing
End Sub
<----- Code Begin ----->
kuzub.. why the "B"?.. What was lacking in acperkin's response that was not worthy of an Excellent "A" grade?
Paradox Driver Programming Considerations:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcjetparadox_driver_programming_considerations.asp