Martin Reid
mwp.reid at qub.ac.uk
Thu Jan 22 12:11:02 CST 2009
John A bit dated but will get you up and running and I rate this guy highly. http://www.databasejournal.com/features/msaccess/article.php/3407531/How-to-Execute-SQL-Stored-Procedures-from-Microsoft-Access.htm For information on the strings to use www.connectionstrings.com On the connection http://support.microsoft.com/kb/281784 Martin Martin WP Reid Information Services Queen's University Riddel Hall 185 Stranmillis Road Belfast BT9 5EE Tel : 02890974465 Email : mwp.reid at qub.ac.uk ________________________________________ From: accessd-bounces at databaseadvisors.com [accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby [jwcolby at colbyconsulting.com] Sent: 22 January 2009 17:59 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Stored procedures from Access And how many many many times have I written a step by step, click this, do this kind of instruction when requested? John W. Colby www.ColbyConsulting.com William Hindman wrote: > "they all seem to start with "you know how to do this and here are some > tricks" rather than "since you know nothing, > here is what you are doing and why" > > ...lol ...how many, many, many times, over a long span of years, have I > pushed your buttons for doing the very same thing to we poor AccessD > illiterates ...you know, you assume we know, but we don't know :) > > William > > -------------------------------------------------- > From: "jwcolby" <jwcolby at colbyconsulting.com> > Sent: Thursday, January 22, 2009 11:59 AM > To: "Access Developers discussion and problem solving" > <accessd at databaseadvisors.com> > Subject: [AccessD] Stored procedures from Access > >> OK, I have built my first pass through query, which runs >> just fine. >> >> Basically I am trying to run stored procedures in SQL which >> have parameters. >> >> I built the pass through query as a simple >> >> "exec MyProcName, Param1, Param2" >> >> Where param1 and param2 are hard coded. I do not see a way >> to place parameters in a collection like you can do with >> regular queries. Did I miss something there? >> >> Now, I think it was Charlotte (I deleted the email after >> copying the code) that provided a CallADOStoredProc, which I >> am trying to use. However I am getting an "odbc call >> failed" error, which I am pretty certain is because it uses >> the standard currentproject.connection. That connection >> does not reference the server or the database, so how can it >> know where to send the odbc call? >> >> Questions: >> >> 1) Is the parameter collection that is being filled in >> CallADOStoredProc replace the hard coded parameters in my >> pass through query? I.e. can I just remove the hard coded >> parameters and place them in the call to CallADOStoredProc? >> >> 2) Is CallADOStoredProc looking for a local pass through >> query at all, or is it looking for the name of a stopred >> procedure out in SQL Server? >> >> 3) Do I need to find a "standard" connection string which >> will reference the SQL Server? >> >> I am now using tons of Stored Procedures out in SQL Server >> but I have absolutely zero experience causing them to >> execute from Access. I need some very basic instructions on >> how to do this. I have found things on the internet but >> they all seem to start with "you know how to do this and >> here are some tricks" rather than "since you know nothing, >> here is what you are doing and why". >> >> Can anyone here provide a "since you know nothing" approach? >> >> TIA, >> >> -- >> John W. Colby >> www.ColbyConsulting.com >> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/accessd >> Website: http://www.databaseadvisors.com >> > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com