I m NOT using storedprocedure. I m using the ADO command object which will stored the compiled command text. I m passing only parameter value in UPDATE command text. And it doesn't return value or parameter.
How can i do this.
Pls see my command syntex below.
Set rsPending = New ADODB.Command
Set rsPending.ActiveConnection = cnnDefault
rsPending.CommandType = adCmdText
rsPending.CommandText = "UPDATE vTableServerAllocationView _
& " SET EG0_User='varUserid' OUTPUT INSERTED.Sr_No,INSERTED.Doc_No WHERE Sr_No =?"
rsPending.Parameters.Append rsPending.CreateParameter("SN", adDouble, adParamInput)
rsPending.Prepared = True
It doen't appear that you are writing in .NET. Too bad. If I'm wrong then...
I'm sure I'll get a lot of flack for suggesting this, but it works, and under the proper circumstances, there is nothing at all wrong with it. Forget the parameter. If your code returns a record in your query window, then retrieve that record with a DataReader. Just replace the code after setting the CommandText property, with the following.
Dim dr As SqlDataReader
dr = rsPending.ExecuteReader
If dr.HasRows = True Then
'Collect the field data from dr('FieldName' [or ordinal]).ToString for each column.
By the way... GOOD article. GOOD discussion.
Tom GarthVertical Solutions"There are three kinds of men. The one that learns by reading. The few who learn by observation. The rest of them have to pee on the electric fence for themselves." -- Will Rogers