Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

docmd.transfertext using a stored procedure or query in an adp.

Status
Not open for further replies.

GShen

MIS
Sep 26, 2002
561
US
Tried posting in other forums, maybe this is the correct one to post in.
I can't believe this will not work.
Using an ADP. backend stored procedures. have done this million times using a table. Can you substitute a stored procedure returning the data you want in place of the table? 100 people on the net say yes, 100 say no. The syntax says you can use a query. Does a query mean a sp as well? 1 person said create a query in vb. I did an add in for 3.6 DAO. The set qry comes up with and invalid object.

Dim qry As querydef
Dim sqlStmt As String

sqlStmt = "SELECT tblepoftp_Data " & _
"FROM tblEDIPOFTP"

Set qry = CurrentDb().QueryDefs("qryTemp")
qry.sql = sqlStmt

DoCmd.TransferText acExportFixed, , qry.sql, FTPAddress

....thanks.

Remember when... everything worked and there was a reason for it?
 
GShen:

Sorry but i dont think this will work

1) an adp does not have a CurrentDb Property
2)even in a mdb the proper syntex whould have been
Code:
DoCmd.TransferText acExportFixed, , "qryTemp",FTPAddress
3)acExportFixed needs a SpecificationName or schema file

what is it that you are trying to do perhaps we can find a work around
 
Hey there,
A few notes. Intellisense comes up with currentDb in the vb code which is a little weird. As far as the schema, it dynamically creates the schema everytime and then I kill it after it creates it. From my understanding the schema file will be different for every file name. I am trying to send p/o's to vendors. The name of each member will indeed be the p/o number. Hence, I was thinking I can't use a schema.ini file. Can I rename the schema it creates and then use that one everytime I run this? Is it in one of the parameters to use a particular schema? THe bottom line is I run an sp to create a table with 2 fields. 1 is a simple auto number file (int) and the next is the data string I am creating (varchar(500))which is more than enough. I need to transfer just the data field. I can't have the ID out there.
Thanks. I will look up the schema while I await a reply. If I am incorrect or you need more info.,please let me know. Thanks so much......Gary

Remember when... everything worked and there was a reason for it?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top