Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
[Excel2007] How to obtain provider name for ADODB.Connection
Hi!.
I'm trying to connect to .dbf files via adodb service. The problem is that i dont know how to obtain correct provider name for the chosen ODBC driver. On msdn website i've found that its enough to choose standard Microsoft.Jet.OLEDB.4.0, but it doesn work with VFP .dbf files (unrecognized database file format ). I have several odbc drivers innstalled and i could work with any of them, but i cant find the way to know its provider name. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
[Excel2007] How to obtain provider name for ADODB.Connection
Please note that when you work with .dbf files the source DB will the folder
and not the database file.. Try and feedback Dim con As New ADODB.Connection con.Open "Driver={Microsoft FoxPro VFP Driver (*.dbf)}; SourceType=DBF;SourceDB=c:\;NULL=No;Exclusive=No" If this post helps click Yes --------------- Jacob Skaria "Przemek" wrote: Hi!. I'm trying to connect to .dbf files via adodb service. The problem is that i dont know how to obtain correct provider name for the chosen ODBC driver. On msdn website i've found that its enough to choose standard Microsoft.Jet.OLEDB.4.0, but it doesn work with VFP .dbf files (unrecognized database file format ). I have several odbc drivers innstalled and i could work with any of them, but i cant find the way to know its provider name. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
[Excel2007] How to obtain provider name for ADODB.Connection
Private Sub proba()
Dim aCon As ADODB.Connection Set aCon = New ADODB.Connection aCon.Open "Driver={Microsoft FoxPro VFP Driver (*.dbf)}; " & _ "SourceType=DBF;SourceDB=c:\temp\database\;NULL=No ;Exclusive=No" End Sub generates Run-time error "[Microsoft][ODBC Driver Manager] The driver doesnt support this function" Its just error translation from polish. But ... MS VFP Driver isn't added as a system nor user DSN. It just exists as a driver in ODBC Sources in System Manager. I'm not sure if i have to add it to DSN. BTW. i read that declaration such "dim variable as new Object" is not recommended. Is it true or its' no matter ? Dim con As New ADODB.Connection con.Open "Driver={Microsoft FoxPro VFP Driver (*.dbf)}; SourceType=DBF;SourceDB=c:\;NULL=No;Exclusive=No" |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
[Excel2007] How to obtain provider name for ADODB.Connection
Please check the driver you have. i am using Microsoft® Visual Foxpro® ODBC
Driver version 6.1.8630.1 . (vfpodbc.dll) Hope you have referred Microsoft ActiveX Data Objects 2.x Library If this post helps click Yes --------------- Jacob Skaria "Przemek" wrote: Private Sub proba() Dim aCon As ADODB.Connection Set aCon = New ADODB.Connection aCon.Open "Driver={Microsoft FoxPro VFP Driver (*.dbf)}; " & _ "SourceType=DBF;SourceDB=c:\temp\database\;NULL=No ;Exclusive=No" End Sub generates Run-time error "[Microsoft][ODBC Driver Manager] The driver doesnt support this function" Its just error translation from polish. But ... MS VFP Driver isn't added as a system nor user DSN. It just exists as a driver in ODBC Sources in System Manager. I'm not sure if i have to add it to DSN. BTW. i read that declaration such "dim variable as new Object" is not recommended. Is it true or its' no matter ? Dim con As New ADODB.Connection con.Open "Driver={Microsoft FoxPro VFP Driver (*.dbf)}; SourceType=DBF;SourceDB=c:\;NULL=No;Exclusive=No" |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
[Excel2007] How to obtain provider name for ADODB.Connection
and all is clear...
driver ver. 1.00.02 MSADO ver. 2.8 thank You Please check the driver you have. i am using MicrosoftR Visual FoxproR ODBC Driver version 6.1.8630.1 . (vfpodbc.dll) Hope you have referred Microsoft ActiveX Data Objects 2.x Library |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ADODB Connection | Excel Worksheet Functions | |||
Set cnn = New ADODB.Connection | Excel Programming | |||
ADODB.Connection | Excel Programming | |||
ADODB.Connection | Excel Programming | |||
ADODB Connection Problem | Excel Programming |