Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / March 2005

Tip: Looking for answers? Try searching our database.

Stored Procedures

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SmogerP - 29 Mar 2005 21:21 GMT
I am running a stored procedure to update tables and return the record id of
the record that was just entered.  I am having issues on the Stored Procedure
seems to work differently when I run it straight out and when I step thru the
code.  

Here is the partial code I am utilizing:
sSPName = "spCreateFromExisting_CA_to_UP
MyQuery.sql = "Exec " & sSPName & " '" & sNCLFileNo & "', Null"
MyQuery.ReturnsRecords = True
           
Set rs3 = MyQuery.OpenRecordset()

If I step thru the code thru this, the tables are updated correctly.  I can
take the MyQuery.sql from Debugger and run it utilizing SQL Query Analyer and
the tables also are updating correctly.  

If I run the code straight thru, I have a table that doesn't get updated.  
Being I can run this by stepping thru the code and from the SQL Query
Analyzer, I am thinking it is an Access thing.

Anyone have any suggestions?

Thanks in advance.

Phill Smoger
phill.smoger@ncl-link.com
Brian - 30 Mar 2005 13:53 GMT
> I am running a stored procedure to update tables and return the record id of
> the record that was just entered.  I am having issues on the Stored Procedure
[quoted text clipped - 22 lines]
> Phill Smoger
> phill.smoger@ncl-link.com

I can't really see how it could be an Access thing.  The first thing to try
would be to use the SQL Profiler to see what's actually arriving at the
server.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.