genaughton
asked on
DoCmd.TransferText changes "." to "#" in file extension and fails
When I try to execute this line of code:
DoCmd.TransferText acExportDelim, "XML_RaterExport", "tblRates", "C:\Temp\Rates.csv", True
I get an error --
Run-time error '3011': The Microsoft Jet database engine could not find the object 'Rates#csv'
Note that somehow Access is deciding that the "." is a "#" ???
The same thing happens with a ".txt" extension. I was originally passing the output filename via a string variable, but I get the same results even hard-coded as above.
I'm stumped -- experts?
Thanks in advance!
JN
DoCmd.TransferText acExportDelim, "XML_RaterExport", "tblRates", "C:\Temp\Rates.csv", True
I get an error --
Run-time error '3011': The Microsoft Jet database engine could not find the object 'Rates#csv'
Note that somehow Access is deciding that the "." is a "#" ???
The same thing happens with a ".txt" extension. I was originally passing the output filename via a string variable, but I get the same results even hard-coded as above.
I'm stumped -- experts?
Thanks in advance!
JN
if you can not read the field correctly ,
s/b
if you can not read the FILE correctly ,
s/b
if you can not read the FILE correctly ,
ASKER
Cap,
your code runs ok -- are we just checking functionality? Note that what I'm after is an export from tblRates to a .txt or .csv file. Jet seems to be internally changing the .csv in the code to #csv...
JN
your code runs ok -- are we just checking functionality? Note that what I'm after is an export from tblRates to a .txt or .csv file. Jet seems to be internally changing the .csv in the code to #csv...
JN
ASKER
Decompiled/compiled ok. Same results.
JN
JN
are we just checking functionality? yes
is you jet up to date?
is you jet up to date?
see this link
http://support.microsoft.com/kb/829558
http://support.microsoft.com/kb/829558
ASKER
I'm running Access 2003 SP2. In the system info, it shows Jet version 4.0 -- this is a corporate environment, so I'm limited on what I can do software install-wise without involving IT. Is there a known issue with Jet in this area?
thx,
JN
thx,
JN
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ok, if u got A2003, the dll version will differ, but Im sure it should be easy to pickup
ASKER
This is interesting. In the system info for Jet Core Components, the path for Jet 4.0 shows as "Not Available" and the version is blank. Also, if I do a search for msrd4*.* (based on the listed file name for Jet 3.0 of msrd3x40.dll), I come up with "file not found."
It seems amazing that this would be the first issue I've hit in 6 months if the install is bad, tho(?).
JN
It seems amazing that this would be the first issue I've hit in 6 months if the install is bad, tho(?).
JN
Are you able to export manually?
can you try this...
open your VBA window
Tools>references
uncheck any of the selected references, remember it
close
do a debug>compile
now go back to references and select the one that you uncheked
do a debug>compile
see if this will make a difference
open your VBA window
Tools>references
uncheck any of the selected references, remember it
close
do a debug>compile
now go back to references and select the one that you uncheked
do a debug>compile
see if this will make a difference
ASKER
Cap,
Oh, crud. When I tried exporting manually, I got an error that the fields in the table didn't correspond to the fields in the export filespec I was calling.
I'd used an export spec during development and testing with a set file, but the production version will be exporting a table that is built "on the fly" via code code from several sources, so... , when I tried with different source files it bombed.
Thank goodness MS has nice clear error messages -- har! har!
Thanks again for your help -- I'd definitely still be banging my head on the wall if you hadn't pointed me back to basic troubleshooting.
JN
Oh, crud. When I tried exporting manually, I got an error that the fields in the table didn't correspond to the fields in the export filespec I was calling.
I'd used an export spec during development and testing with a set file, but the production version will be exporting a table that is built "on the fly" via code code from several sources, so... , when I tried with different source files it bombed.
Thank goodness MS has nice clear error messages -- har! har!
Thanks again for your help -- I'd definitely still be banging my head on the wall if you hadn't pointed me back to basic troubleshooting.
JN
Ive never been called cap before :)
rocki,
are you morphing now?
are you morphing now?
ASKER
Holy cow.
Well, it just shows what kind of day I've been having -- thanks rocki!
JN
Well, it just shows what kind of day I've been having -- thanks rocki!
JN
:-D
sub test()
dim sFile as string, cFile as string
sfile="C:\Temp\"
cfile=dir(sfile,"*.csv")
while cfile<>""
msgbox cfile
cfile=dir
wend
end sub
if you can not read the field correctly ,
do a debug>compile
check all errors raised
see if you have a MISSING: from your references
do a compact and repair
do a decompile
see instruction here
http://www.granite.ab.ca/access/decompile.htm