Recordsets

DaveBrown_79
06-05-2002, 04:54 AM
I m using a multiple parameter query to return values from an SQL server database, (the query consists of a date range),
When I execute the query it works fine, but if I try to change one of the parameters without restarting the program I get the following error

' No Value given for one or More Parameters '

Is there anyway of refreshing the recordset after each execution

Cheers ! !

rive
06-05-2002, 06:21 AM
Sure it's possible. If you post the code, we might be able to help you locate the error.

DaveBrown_79
06-10-2002, 09:55 AM
Here is the code


DataEnvironment14.Commands("logdate").Parameters("Param1") = CDate(DTPicker1.Value)
DataEnvironment14.Commands("logdate").Parameters("Param2") = CDate(DTPicker2.Value)

If DataEnvironment14.rslogdate.State = 1 Then
DataEnvironment14.rslogdate.Close
End If

DataEnvironment14.rslogdate.Open
'DataEnvironment14.rslogdate.State = 1

If Not DataEnvironment14.rslogdate.EOF Then '* Records were found
DataEnvironment14.rslogdate.MoveLast
lCount = DataEnvironment14.rslogdate.RecordCount

DataEnvironment14.rslogdate.Close

End If

Set VSFlexGrid3.DataSource = DataEnvironment14

IS IT AS SIMPLE AS RSLOGDATE.REFRESH

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum