cyprus106
Programmer
- Apr 30, 2001
- 654
I've got the following function, (The intTotal is for future creation,) in which I create a database record. I've got to get the uniqueidentifier (or autonumber, same thing almost but not really) for the record I just created. I've got nothing unique that I can search for to get the record. Deductively, the only way I can get this record is the uniqueidentifier. But I can't. I'm still know knowledgable enough to figure it out. I really hope someone else is. Thanks!!
function WriteSerial(intTotal)
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection"
objConn.Open strConnect
set rsMList = Server.CreateObject("ADODB.Recordset"
rsMList.Open "Orders", objConn, adOpenForwardOnly, adLockOptimistic, adCmdTable
rsMList.AddNew
rsMList("OrderDate"
= NOW
rsMList("Total"
= intTotal
rsMList.Update
CartSerial = rsMList("Serial"
rsMList.close
Set rsMList = Nothing
WriteSerial = CartSerial
end function
Cyprus
function WriteSerial(intTotal)
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection"
objConn.Open strConnect
set rsMList = Server.CreateObject("ADODB.Recordset"
rsMList.Open "Orders", objConn, adOpenForwardOnly, adLockOptimistic, adCmdTable
rsMList.AddNew
rsMList("OrderDate"
rsMList("Total"
rsMList.Update
CartSerial = rsMList("Serial"
rsMList.close
Set rsMList = Nothing
WriteSerial = CartSerial
end function
Cyprus