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!

CreateQueryDef In ADP

Status
Not open for further replies.

GooGoocluster

Technical User
May 12, 2005
71
US
I was able to use the following code in a regular mdb file but I took same code unchanged into my .adp file and I get runtime error 91 "object or with block not found" from what I recall. Does any one know the code that will work for adp?

Thanks


Code:
strSQL = "SELECT ImportTable.* FROM ImportTable ORDER BY ImportTable.BARCODE"
    
    Set db = CurrentDb
    Set qDef = db.CreateQueryDef("qryTmpExport", strSQL)
 
It's impossible that way...

adp works with an external database engine(namely SQL Server). In this configuration, SQ Server does all data management, such as tables, views (ordinary queries), functions(parameter queries), stored procedures (SQL code).

QueryDef is an attribute of 'normal' Access operation, not client-server configuration.

You need to Create View ViewName in ADO and execute the command on the server.

If you have administration privileges on SQL, post back and we'll be able to find something.

If not, talk to the SQL developers or to the SysAdmin.

HTH

[pipe]
Daniel Vlas
Systems Consultant

 
I should have admin rights. they made me the owner of the database. Earlier I made this same view non programatically and was trying to use the transferdatabase command to export it into a .dbf and it said it was having trouble finding the view could this be one of the incompatibilty issuses with adp's and mdb's?

my ultimate goal is export this view to a dbf 5.0 file. I have done this before using the mdb but I have a much larger database that is adp and I want to incorperate this function into this bigger database.
 
I have created the view and now it is just in my adp database. but I cant export it to dbase file. here is what I tried

Code:
DoCmd.TransferDatabase acExport, "dBase 5.0", "L:\DC\JTM\Master Form\JTM.adp", acQuery, "qryTmpExport", StrJob, False
This code says the path is not correct. but it is the exact path that the view "qryTmpEport" belongs to. do I need a connection string to the server to get this to export?

thanks in advance.
 
Does outputto create dbase 5.0 files? I thought I looked to see if it could i will look again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top