Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Function get_price(goodsid As Long) As Double
- Dim rs As New ADODB.Recordset
- Dim sql$
- sql$ = "SELECT goods.PRICE FROM goods WHERE goods.IS_DELETED=0 AND goods.ID=" & goodsid & ";"
- OpenMyRecordset rs, sql$, , , True
- If Not rs.BOF Then
- get_price = Nz(rs!PRICE)
- Else
- get_price = 0
- End If
- If Not rs Is Nothing Then
- If rs.State = adStateOpen Then rs.Close
- Set rs = Nothing
- End If
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement