DoCmd.TransferText Access ADP

  • Thread starter Thread starter as
  • Start date Start date
A

as

Hi All,
Can we at all use the DoCmd.TransferText command in Access ADP 2003
with SQL server 2000 as backend.
I am not sure if we can actually use this.
I tried to run the same code that as there in the MDB application in my
ADP application

This is the code
DoCmd.TransferText acExportDelim, , "qryTestQuery", sPath &
"\TestLetters.txt", True, , 65001

"qryTestQuery" is a View.

But it returned me an error number 7874.
And error description as Microsoft Access can't find the object
'qryTestQuery.'

Am I doing any thing wrong here. Please guide me.

thanks
SD
 
Try to prefix qryTestQuery with dbo or with the owner (user) name if it's
not dbo.

S. L.
 
Hi Sylvain,
I tried with the dbo and and as well the owner(user) for both the access and
as well as the SQL database but it returned with the same err description

Microsoft Access can't find the object 'sa.qryTestQuery.'

I ven tried by replacing the dbo with the access databasename and then with
the SQl database name but the same result.

I am still not sure if DoCmd.TransferText does work in ADP at the first
place. I tried to search for this on the net but no help.

thanks
sd
 
What is the "qryTestQuery"? Is is a View, a Stored Procedure, or a Table? Do
you see it in Access ADP's database window under "Tables", "Views" or
"Stored Procedures" (After Access XP, Views and Stored Procedures now groups
under "Queries")? Since you mentioned the code is from *.mdb, I susppect
that the qryTestQuery is Accss Query, which only exists in *.mdb, not *.APD,
hence the "Can't find..." error. ADP is different from MDB, which does not
contains queris (except for the SQL statements written in VBA code), it uses
Tables/Viwes/SPs existing in the database on the SQL Server.
 
I had a similar problem trying to export to an Excel spreadsheet, could not
connect to a view (It was a view even thought listed as a query) and it
would not connect. I transferred the data from the view to a table, then
exported successfully from the table. In other words transfertxt seems to
connect to tables but not views. You could probably use a temp table for
this, though I just use an existing table and empty it.

Bill
 
Bill Patten said:
I had a similar problem trying to export to an Excel spreadsheet, could not
connect to a view (It was a view even thought listed as a query) and it
would not connect. I transferred the data from the view to a table, then
exported successfully from the table. In other words transfertxt seems to
connect to tables but not views. You could probably use a temp table for
this, though I just use an existing table and empty it.

Bill

for Excel spreadsheet ...
 
The "qryTestQuery " is a view. I have Access 2003 on my machine and in the
ADP its under the Queries section. And this is existing as a View on the SQL
server database.

thanks
sd
 
Back
Top