K
Keith G Hicks
Sorry, there just doesn't seem to be a good place to ask this. Figured a
busy NG would be best.
I need to set the source of a list box to the set of records returned from a
MS SQL Server 2k stored procedure.
There's no problem executing the SP, but how do I set the result set so that
it's displayed in the list box?
Here's my code:
Dim cmd As ADODB.Command
Set cmd = New ADODB.Command
cmd.ActiveConnection = sConnectionStirng
cmd.CommandText = "spCustomers"
cmd.CommandType = adCmdStoredProc
'Set the parameters
cmd.Parameters.Append cmd.CreateParameter("@StateID", adChar,
adParamInput, 2, Me!cboState)
cmd.Prepared = True
Dim rs As ADODB.Recordset
Set rs = cmd.Execute()
' ????? Me!lstCustomersFromACertainState.RowSource = cmd.Execute()
Thanks,
Keith
busy NG would be best.
I need to set the source of a list box to the set of records returned from a
MS SQL Server 2k stored procedure.
There's no problem executing the SP, but how do I set the result set so that
it's displayed in the list box?
Here's my code:
Dim cmd As ADODB.Command
Set cmd = New ADODB.Command
cmd.ActiveConnection = sConnectionStirng
cmd.CommandText = "spCustomers"
cmd.CommandType = adCmdStoredProc
'Set the parameters
cmd.Parameters.Append cmd.CreateParameter("@StateID", adChar,
adParamInput, 2, Me!cboState)
cmd.Prepared = True
Dim rs As ADODB.Recordset
Set rs = cmd.Execute()
' ????? Me!lstCustomersFromACertainState.RowSource = cmd.Execute()
Thanks,
Keith