Hello,
I used stored procedure with parameter from form..I do not see the resultset when executed..
can we display the results just like int query or i need report to display results?
I used the following code
Dim cnn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rec As New ADODB.Recordset
Dim amount As Integer
txtAmount.SetFocus
amount = txtAmount.Text
Dim param1 As Parameter, param2 As Parameter, param3 As Parameter
Dim param4 As Parameter, param5 As Parameter
Set cnn = CurrentProject.Connection
Set cmd.ActiveConnection = cnn
cmd.CommandText = "dbo.p_amount_search"
cmd.CommandType = adCmdStoredProc
Set param1 = cmd.CreateParameter("amount", adInteger, adParamInput)
cmd.Parameters.Append param1
param1.Value = amount
Set rec = cmd.Execute
Thanks
I used stored procedure with parameter from form..I do not see the resultset when executed..
can we display the results just like int query or i need report to display results?
I used the following code
Dim cnn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rec As New ADODB.Recordset
Dim amount As Integer
txtAmount.SetFocus
amount = txtAmount.Text
Dim param1 As Parameter, param2 As Parameter, param3 As Parameter
Dim param4 As Parameter, param5 As Parameter
Set cnn = CurrentProject.Connection
Set cmd.ActiveConnection = cnn
cmd.CommandText = "dbo.p_amount_search"
cmd.CommandType = adCmdStoredProc
Set param1 = cmd.CreateParameter("amount", adInteger, adParamInput)
cmd.Parameters.Append param1
param1.Value = amount
Set rec = cmd.Execute
Thanks