Ms Access Error 3325
+ Ask a Question Need help? Post your question and get tips & solutions from a community of 418,595 IT Pros & Developers. It's quick & easy. Proper way to run an Action Pass Through Query from Access 2000 P: n/a ILCSP Hello, I'm fairly new to the concept of running action pass through queries (insert, update, etc.) from Access 2000. I have a SQL Server 2000 database and I'm using a Access 2K database as my front end. I'm using a blank pass through query which gets the Transact-SQL part inserted from a button in my form. After inserting the Transact-SQL code into the pass through query, I 'open the recordset' to make the query run. However, everytime this is successful I get a 3325 runtime error: "Pass-through query with ReturnsRecords property set to True did not return any records". I've tried to set the Return Records query property to 'No' but it does not insert any records if I do. I have to catch that 3325 error in the error handler, but I don't want that error to show up at all. This also happens with my Update Pass Through Queries. What I want is to just insert the SQL code in the pass through query, run it so it inserts or updates and that's it. I don't want to return a recordset, or I don't want to return errors. I know I could do this with a store procedure, but I'm hoping this could work too. This is what I do from my button: --------------------------------------------------- On Error GoTo ExitHere ' Using a Pass Through query to insert the new records Dim loDB As DAO.Database Dim loQdf As DAO.QueryDef Dim rs As DAO.Recordset ' set the variable values Set loDB = CurrentDb Set loQdf = loDB.QueryDefs("qryInsertRecords") loQdf.SQL = "INSERT INTO Orders (CheckNumber, FirstName, LastName, Amount, AddedBy ) SELECT Finance.CheckNumber, Finance.FirstName, Finance.LastName, Finance.Amount, Finance.AddedBy FROM Finance" ' opening the new recordset Set rs = loQdf.OpenRecordset() 'cle
links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center. Forums Archive > ASE > Connectivity - ODBC > "MS Access 3325 (Pass-through query did not return any records)" MS Access 3325 (Pass-through https://bytes.com/topic/access/answers/428158-proper-way-run-action-pass-through-query-access-2000-a query did not return any records) 4 posts in Connectivity - ODBC . Last posting was on 2003-09-23 15:33:29.0Z Robert Leitner Posted on 2003-09-08 21:12:35.0Z Sender: 7708.3f5cee8b.1804289383@sybase.comFrom: Robert LeitnerNewsgroups: sybase.public.connectivity.odbcSubject: MS Access 3325 (Pass-through query did not return any records)X-Mailer: WebNews to Mail Gateway v1.1sMessage-ID: <3f5cf0c3.7721.846930886@sybase.com>NNTP-Posting-Host: http://nntp-archive.sybase.com/nntp-archive/action/article/115997%3Bjsessionid=A7BE1259C3FBA2AFE79F3AC9F97DF615 10.22.241.41X-Original-NNTP-Posting-Host: 10.22.241.41Date: 8 Sep 2003 14:12:35 -0700X-Trace: forums-1-dub 1063055555 10.22.241.41 (8 Sep 2003 14:12:35 -0700)X-Original-Trace: 8 Sep 2003 14:12:35 -0700, 10.22.241.41Lines: 12Path: forums-1-dub!not-for-mailXref: forums-1-dub sybase.public.connectivity.odbc:3023 Article PK: 115958 We used to get MS Access error 3325 "Pass-through query with ReturnsRecords property set to True did not return any records. (DAO.Database)", but that was resolved by setting SkipDMLInBatches=1. We are now using Sybase ASE ODBC Driver Version 3.70.00.20, and the problem has started happening again. I also tried SkipDMLInBatches=2, but that didn't seem to make a different. Is there some new magical setting for this latest ODBC driver which will make the problem go away once again? odbcpse Posted on 2003-09-09 15:35:22.0Z Message-ID: <3F5DF2D2.A9DCC3C0@earth.com>From: odbcpse
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance https://www.experts-exchange.com/questions/24507036/Execute-Stored-Procedure-in-MS-Access-VBA.html Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > Execute Stored Procedure in MS Access VBA Want to Advertise Here? Solved Execute Stored Procedure in MS Access VBA Posted on 2009-06-19 MS Access MS ms access SQL Server 2005 1 Verified Solution 6 Comments 1,385 Views Last Modified: 2013-11-27 Hello, I'm trying to excute a parameter stored procedure in MS Access... i'm passing the name of the person through strUserName = DLookup("UserFirstName", "tblListOfContacts", "UserNetworkName = '" & fOSUserName() & "'") the function captures their network id and i compare it to table... everything seems to run fine ms access error and it excutes in the end, but i keep getting the following error: Run-time error '3325': Pass-through query with ReturnsRecords Property set to true did not return any records. The stored procedure is just passing the name of the user to send an email to the managers... should i use a different method to execute the stored procedure Private Sub Command70_Click() Dim db As Database Dim dq As QueryDef Dim strStoreProc As String Dim strUserName As String strStoreProc = "sp_NotificationWinner" strUserName = DLookup("UserFirstName", "tblListOfContacts", "UserNetworkName = '" & fOSUserName() & "'") Set db = CurrentDb() Set dq = db.CreateQueryDef("") dq.Connect = "database path here" dq.SQL = "EXEC " & strStoreProc & " " & strUserName dq.OpenRecordset End Sub Select all Open in new window 0 Question by:AIdoHSG Facebook Twitter LinkedIn Google LVL 44 Active today Best Solution byLeigh Purvis Given that you say that the SP is in SQL Server, then the only way DoCmd.RunSQL will work if if you're using an ADP - but I don't see any