ado to stored procedure interaction
From: smk23 (smk23_at_discussions.microsoft.com)
Date: 11/24/04
- Next message: Z-man: "Re: If field('field name') exists"
- Previous message: nicolau: "Re: Event Disconnect"
- Next in thread: Val Mazur: "Re: ado to stored procedure interaction"
- Reply: Val Mazur: "Re: ado to stored procedure interaction"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 24 Nov 2004 08:37:05 -0800
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()
'On Error GoTo Error_Handler
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: Z-man: "Re: If field('field name') exists"
- Previous message: nicolau: "Re: Event Disconnect"
- Next in thread: Val Mazur: "Re: ado to stored procedure interaction"
- Reply: Val Mazur: "Re: ado to stored procedure interaction"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|