This function returns a null when the value of "StartingHours" is a negative.
is there something I can do or do I have to convert to posative numbers with a negative flag?
function GetStartHours(CustomerNo)
Set db = Server.CreateObject("ADODB.Connection"
db.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=" & Server.Mappath("\dbdemo\fpdb\extranet.mdb" & ";" & "Jet OLEDBatabase Password="
set rst = db.Execute("SELECT StartingHours, CustomerNo FROM Customers WHERE (((Customers.CustomerNo)=" & CustomerNo & ");"
select case rst.eof
case true
GetStartHours = 0
case false
rst.movefirst
select case rst.fields("StartingHours".value
case null,""," "
GetStartHours = 0
case false
GetStartHours = rst.fields("StartingHours".value
end select
end select
set rst = nothing
set db = nothing
end function
is there something I can do or do I have to convert to posative numbers with a negative flag?
function GetStartHours(CustomerNo)
Set db = Server.CreateObject("ADODB.Connection"
db.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=" & Server.Mappath("\dbdemo\fpdb\extranet.mdb" & ";" & "Jet OLEDBatabase Password="
set rst = db.Execute("SELECT StartingHours, CustomerNo FROM Customers WHERE (((Customers.CustomerNo)=" & CustomerNo & ");"
select case rst.eof
case true
GetStartHours = 0
case false
rst.movefirst
select case rst.fields("StartingHours".value
case null,""," "
GetStartHours = 0
case false
GetStartHours = rst.fields("StartingHours".value
end select
end select
set rst = nothing
set db = nothing
end function