Advertisement

07.04.2007 at 03:57AM PDT, ID: 22674876
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

5.8

call SQL Stored Procedure from Access using ADO

Asked by gardmanIT in Microsoft Access Database, MS SQL Server

Tags: , , , ,

Hi,

App:Access 2003, SQL Server 2000

I cant seem to figure out what im doing wrong.

Calling a stored procedure on MS SQL 2000 from Access I know its working cus part of the stored procedure adds + 1 to a record.

Here is my stored proc : -

CREATE  PROCEDURE dbo.prc_get_unique_load
AS
DECLARE @gKey int
DECLARE @rKey int
DECLARE @OutKey int

/*Read in current unique ID*/
SELECT @gKey = (SELECT load_key FROM tbl_cfg)

/* Set it to the next value straight away*/
SET @rKey = @gKey + 1

/*Save it back to the database before we do anything else*/
UPDATE tbl_cfg SET LOAD_KEY = @rKey

SET @OutKey = @gKey
SELECT @OUTKEY AS UniqueKey
GO

As you can see it gets the value from Load_key, adds 1 to  it. It then displays the vlaue it first recevied from load_key. I wish to get this value and return it to my access app!

For some reason I cant get it to work, I keep getting ERROR:3704 Operation is not allowed when the object is closed.

I can understand this error as in its saying ive nto got a recordset there so how can I do a "if not rs.eof"

What am i missing to retrieve a record back to my access app?? Below is the code I have used to call the stored proc..I have tried many different lumps of code, all run the stored proc but do not return data!

I guess I dont understand how the two interact properly!

Dim cnn
        Dim cmd
        Dim sql
        Dim rs As ADODB.Recordset
        Set rs = New ADODB.Recordset
        Set cnn = New ADODB.Connection
        cnn.Open "Provider=sqloledb;Data Source=GMSQL1;Initial Catalog=GLOAD;Integrated Security=SSPI;"
        Set cmd = New ADODB.Command
        With cmd
        Set .ActiveConnection = cnn
           .CommandType = adCmdStoredProc
           .CommandText = "prc_get_unique_load"
        End With
       
        rs.Open cmd, , adOpenStatic, , adCmdStoredProc


I have also tried : -

Dim myADO As New ADODB.Connection
        Dim sSQL As String
        Dim rs As New ADODB.Recordset

        myADO.Open "Provider=sqloledb;Data Source=GMSQL1;Initial Catalog=GLOAD;Integrated Security=SSPI;"

        sSQL = "exec prc_get_unique_load"
        Set rs = myADO.Execute(sSQL)

My lack of understanding is causing me some confusion im sure and thats where I am going wrong so if somone could point my mistakes out it would be greatfully appreciated!

regards

AntonyStart Free Trial
[+][-]07.04.2007 at 04:03AM PDT, ID: 19417760

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 04:04AM PDT, ID: 19417763

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 04:06AM PDT, ID: 19417773

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 04:17AM PDT, ID: 19417807

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 04:20AM PDT, ID: 19417819

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 04:23AM PDT, ID: 19417835

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 04:30AM PDT, ID: 19417866

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 04:32AM PDT, ID: 19417875

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 04:37AM PDT, ID: 19417894

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 04:44AM PDT, ID: 19417919

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 04:52AM PDT, ID: 19417953

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 05:06AM PDT, ID: 19418013

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 05:22AM PDT, ID: 19418068

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 05:26AM PDT, ID: 19418076

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 05:37AM PDT, ID: 19418125

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 05:41AM PDT, ID: 19418142

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 05:43AM PDT, ID: 19418148

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 05:44AM PDT, ID: 19418152

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 05:50AM PDT, ID: 19418182

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 06:00AM PDT, ID: 19418210

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 06:03AM PDT, ID: 19418224

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 06:07AM PDT, ID: 19418237

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 06:15AM PDT, ID: 19418268

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 06:21AM PDT, ID: 19418299

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 06:25AM PDT, ID: 19418339

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 06:28AM PDT, ID: 19418354

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 07:06AM PDT, ID: 19418586

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 07:16AM PDT, ID: 19418632

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 07:23AM PDT, ID: 19418664

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 07:29AM PDT, ID: 19418693

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 07:30AM PDT, ID: 19418697

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 07:34AM PDT, ID: 19418725

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 07:35AM PDT, ID: 19418727

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 07:37AM PDT, ID: 19418739

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 07:37AM PDT, ID: 19418745

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 07:41AM PDT, ID: 19418765

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Access Database, MS SQL Server
Tags: stored, access, procedure, sql, from
Sign Up Now!
Solution Provided By: LPurvis
Participating Experts: 3
Solution Grade: A
 
 
[+][-]07.04.2007 at 07:43AM PDT, ID: 19418776

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 07:44AM PDT, ID: 19418790

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 07:47AM PDT, ID: 19418807

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2007 at 07:51AM PDT, ID: 19418832

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32