-
Urgent Help!! Upsizing Access to ADP: Error: 7874
Hi, following is the description of scenario and problem encountered.
Scenario:
=========
I just upsized my Access 2000 application to Access ADP. I am calling a function to create runtime query.
Everything works fine. When I call DoCmd.OpenStoredProcedure I get Error: 7874.
But if I go to Debug Mode and then to queries list on Project Window and press <F5> (Refresh) Button. Query name appears on the list. On debugger if play the code again. Everything works fine.
Problem:
========
I want to refresh list of queries through code. How can I do that?
Function listing is given below:
Public Function CreateQuery(sQryName As String)
Dim sSql As String
sSql = "SELECT TblAddress.FirmName, TblAddressDetail.Adressering, TblAddress.SirName, TblAddress.FirstName, TblAddress.MiddleName, TblAddress.Street, TblAddress.HouseNo, TblAddress.HouseArea, TblAddress.Postcode, TblAddress.City, TblLand.Country" & _
" FROM ((((TblMailMerger INNER JOIN TblContacts ON TblMailMerger.ContactID = TblContacts.ContactId) INNER JOIN TblAddress ON TblMailMerger.Category = TblAddress.ClientType) INNER JOIN TblAddressDetail ON (TblAddress.Title = TblAddressDetail.TitleCode) AND (TblAddress.TelId = TblAddressDetail.TelId)) INNER JOIN TblCountry ON TblAddress.CountryID = TblCountry.CountryId) INNER JOIN TblTypeBriefDetail ON (TblTypeBriefDetail.TelId = TblAddress.TelId) AND (TblMailMerger.BriefId = TblTypeBriefDetail.BriefId)" & _
" WHERE (((TblMailMerger.Status)=0))"
sSql = "create Procedure " & sQryName & " as " & sSql & " RETURN"
CurrentProject.Connection.Execute (sSql)
DoCmd.OpenStoredProcedure sQryName, acViewDesign
End Function
Any help in this regard, will be highly appreciated. Thank you!
Similar Threads
-
By Mike Mitchell in forum .NET
Replies: 60
Last Post: 09-13-2002, 05:41 PM
-
By Jill Morris in forum Database
Replies: 2
Last Post: 08-05-2002, 09:25 AM
-
By David Jones in forum Database
Replies: 0
Last Post: 08-31-2001, 12:22 PM
-
By Vaughan in forum Database
Replies: 0
Last Post: 06-28-2001, 03:08 PM
-
By John Wood in forum Database
Replies: 2
Last Post: 08-25-2000, 06:25 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|