Re: VBA to import Visual FoxPro DBF in DBC into Access

Tech-Archive recommends: Speed Up your PC by fixing your registry



lucycard wrote:
On Friday, 11/3/06 I put this post on msdn newsgroup
access.modulesdaovba.adb and realized this morning that this may be
the more appropriate group:

No, you were right the first time. This question has nothing to do with
ADO, despite the fact that you use some ADO objects in your code. The
lines that are throwing your error have nothing to do with ADO ... or
shouldn't ... I haven't played with Access for awhile, but I cannot
remember being able to supply a recordset object, ADODB or DAO, or an
ADO connection object as an argument for the TransferDatabase method.
Access97 was pre-ADO, so it should be clear that the builtin methods
will not be able to recognize ADO objects. You can only supply a
connection string and the name of a table or saved query/view IIRC. The
Access97 online Help was very helpful supplying examples of various
connection strings. Take another look at it.

mycon.Open
myrst.Open strTabName, mycon, adOpenDynamic, adLockReadOnly
' In both cases I get the error message:
'Try number one
' DoCmd.TransferDatabase acImport, myrst, strfolder, acTable,
strTabName, strTabName, False
'Try number two
DoCmd.TransferDatabase acImport, , strFolder, acTable,
strTabName, strTabName, False

This is the only code in the app referring to ADODB.

How do I correct this to automate the file import process?

Your help is appreciated!

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


.



Relevant Pages

  • Re: Software testing
    ... If you do check out TestComplete ... to pay attention to our ADO plug-in. ... object will give you access to either the 3 standard MS ADO objects, ... > too short to display all the data, this is a bug. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Efficiency Question - Dlookup vs ADO cmd execution
    ... migrating them first to ADO objects won't make things easier at all. ... >> can take a look with the SQL-Server Profiler. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Convert CSV file to multiple worksheets
    ... Paul Randall schrieb: ... ADO objects to create the .XLS with the multiple sheets, ... Set oRS = oADOCN.Execute("SELECT sName, iId FROM test.csv ORDER BY sName") ...
    (microsoft.public.scripting.vbscript)
  • Re: Framework 1.1 broke ado
    ... Have you checked the permissoins? ... If there was an error with the ADO objects ... being un-registered then it would generate a classid error. ... > classic asp and uses ado to talk to an access database. ...
    (microsoft.public.dotnet.framework.aspnet)