Hello,
i made a small application in access2000, and in my computer it works fine, but, if i run same application when making a select i have no results.
Public Function getOpGrava(d, o)
Dim conDatabase As ADODB.Connection
Dim rstGrav As ADODB.Recordset
Dim strSQL As String
Dim OpGrava
OpGrava = 0
Set conDatabase = CurrentProject.Connection
strSQL = "SELECT grav FROM prod WHERE day=#" & d & "# AND op='" & o & "'"
Set rstGrav = New Recordset
rstGrav.Open strSQL, conDatabase, adOpenDynamic, adLockOptimistic
Dim eer
With rstGrav
If Not .EOF And Not .BOF Then
eer = .GetString(adClipString)
eer = Replace(eer, vbCr, ""
If eer <> "" Then
OpGrava = eer
End If
End If
End With
rstGrav.Close
conDatabase.Close
Set rstGrav = Nothing
Set conDatabase = Nothing
' setOpGrava = 1
getOpGrava = OpGrava
''Execute * exemplo VB
End Function
in this condition:"If Not .EOF And Not .BOF Then" it jump to End if.... but in my computer dont .....
anyone have any idea ....
T.Y.
i made a small application in access2000, and in my computer it works fine, but, if i run same application when making a select i have no results.
Public Function getOpGrava(d, o)
Dim conDatabase As ADODB.Connection
Dim rstGrav As ADODB.Recordset
Dim strSQL As String
Dim OpGrava
OpGrava = 0
Set conDatabase = CurrentProject.Connection
strSQL = "SELECT grav FROM prod WHERE day=#" & d & "# AND op='" & o & "'"
Set rstGrav = New Recordset
rstGrav.Open strSQL, conDatabase, adOpenDynamic, adLockOptimistic
Dim eer
With rstGrav
If Not .EOF And Not .BOF Then
eer = .GetString(adClipString)
eer = Replace(eer, vbCr, ""
If eer <> "" Then
OpGrava = eer
End If
End If
End With
rstGrav.Close
conDatabase.Close
Set rstGrav = Nothing
Set conDatabase = Nothing
' setOpGrava = 1
getOpGrava = OpGrava
''Execute * exemplo VB
End Function
in this condition:"If Not .EOF And Not .BOF Then" it jump to End if.... but in my computer dont .....
anyone have any idea ....
T.Y.