RE: SP to ADO interaction
From: Alejandro Mesa (AlejandroMesa_at_discussions.microsoft.com)
Date: 11/24/04
- Next message: Ed: "a list of stored procedures"
- Previous message: Louis Davidson: "Re: Cannot use parameter in 'from' section"
- In reply to: smk23: "SP to ADO interaction"
- Next in thread: smk23: "RE: SP to ADO interaction"
- Reply: smk23: "RE: SP to ADO interaction"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 24 Nov 2004 09:39:01 -0800
what about posting the sp's code?
Is the sp returning data to the client app?
AMB
"smk23" wrote:
> Greetings and thanks for the help!
> I am a newbie to ADO and mystified by this:
> In MS Access 2003, I am updating some SQL 2k tables via a stored procedure
> that updates 4 different tables sequentially.
>
> When I test the SP with Query Analyzer, it works fine and updates all four
> tables. When I try to update from the Access form, it stalls and doesn't
> update. I don't get an error message, just a timeout and "EndNow" selection.
> I've checked to see that the input parameters match the input variables in
> the SP and they do. Once the SP has failed after the attempt from Access, the
> SP also fails in query analyzer. I'm wondering if there is some index
> somewhere that needs reset... In any case, I'd be grateful if you could
> suggest how to troubleshoot this. I don't know what else to try.
> Let me know if the SP text would help.
>
> Here is my ADO code:
> Private Sub cmdUpdate_Click()
>
> Dim cnn As ADODB.Connection
> Dim oCmd As ADODB.Command
>
> 'open a connection
> Set cnn = New ADODB.Connection
> cnn.CursorLocation = adUseClient
> ' cnn.Open fstrCnn()
> cnn.Open "Provider=sqloledb;Data Source=MyServer;" & _
> "Initial catalog=MyData;User Id=blank;Password=blank;"
> Set oCmd = New ADODB.Command
>
> With oCmd
>
> Set .ActiveConnection = cnn
> .CommandType = adCmdStoredProc
> .CommandText = "gp_vwSMKSentinelNode_Update"
>
> .parameters.Append .CreateParameter("@AilmentID", adInteger,
> adParamInput)
> .parameters("@AilmentID").Value = Me.AilmentID
>
> .parameters.Append .CreateParameter("@RLB", adSmallInt, adParamInput)
> .parameters("@RLB").Value = Me.txtRLB
> ... a bunch of parameters
>
> .Execute
>
> End With
>
> cnn.Close
> Set cnn = Nothing
>
> --
> sam
- Next message: Ed: "a list of stored procedures"
- Previous message: Louis Davidson: "Re: Cannot use parameter in 'from' section"
- In reply to: smk23: "SP to ADO interaction"
- Next in thread: smk23: "RE: SP to ADO interaction"
- Reply: smk23: "RE: SP to ADO interaction"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|