Problem reusing ADO.Recordset object in VBA script in Excel 
Author Message
 Problem reusing ADO.Recordset object in VBA script in Excel

I have a problem reusing ADO.Recordset object using VBA script in
Excel. I am successful in opening and using it once for data update
followed by Recordset.Close and Set to Nothing methods to release the
object.

I get an error "ODBC driver does not support the requested properties"
when I try to open it the second time in the same program.

The syntax I use is:

 ConnStr = "Driver={Microsoft Visual FoxPro
Driver};SourceType=DBF;SourceDB=" & "C:\DBDIR" & ";Exclusive=no;"

rsDBF.Open filename, cnnDBF, adOpenKeyset, adLockOptimistic, adCmdText

I will appreciate if replies can be sent directly to

Thank you.



Tue, 14 Dec 2004 06:03:17 GMT  
 Problem reusing ADO.Recordset object in VBA script in Excel
Hi,

See my answer on your previous posting. Try to use SELECT SQL statement to
open table

--
Val Mazur
Microsoft MVP


Quote:
> I have a problem reusing ADO.Recordset object using VBA script in
> Excel. I am successful in opening and using it once for data update
> followed by Recordset.Close and Set to Nothing methods to release the
> object.

> I get an error "ODBC driver does not support the requested properties"
> when I try to open it the second time in the same program.

> The syntax I use is:

>  ConnStr = "Driver={Microsoft Visual FoxPro
> Driver};SourceType=DBF;SourceDB=" & "C:\DBDIR" & ";Exclusive=no;"

> rsDBF.Open filename, cnnDBF, adOpenKeyset, adLockOptimistic, adCmdText

> I will appreciate if replies can be sent directly to

> Thank you.



Tue, 14 Dec 2004 20:05:23 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Unable to reuse ADO.Recordset connection using VBA script in Excel

2. Reusing VBA/Access Forms thru DAO/ODBC/ADO

3. Unclear on Reuse of Connection & Recordset Objects

4. vba script in excel to perform manipulations in excel

5. ASP Script problem with ADO Recordset

6. Recordset reuse/Rebind Controls Versus Many Recordsets/Binding once

7. ADO Recordset object problem

8. MDAC ado data object recordset reference problem

9. problem: cloning a disconnected ADO recordset from a class object

10. Running VBA code in EXcel from VB6 using EXcel Objects

11. Compatibility Problem Using MS Excel 97 VBA on Excel 2000/XP - Causes crashes

12. Problem opening Excel Addin with Excel application object

 

 
Powered by phpBB® Forum Software