|
-
Jun 29th, 2000, 04:33 AM
#1
Thread Starter
Lively Member
hi i wanted to create a recordset so that i could get the last record to find out the primary key. I wanted to use this record and add 1 to it to get the primary key of the next record. This is done to mirror an access datbase to reflect the oracle environment. However i keep getting the following error:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'Cint'
/App/app.asp, line 109
it doesnt regonize the cint. Any hints on what could be causing this.
Regards Scott
sub lastAddOpen
dim rstCand
dim qryCand
dim strLastRecord
'dim intcandID
set rstCand=server.CreateObject("ADODB.Recordset")
qryCand="select * from HRR_Address"
rstcand.Open qryCand,dbconn,adOpenKeyset
'set rstCand=dbConn.Execute(qryCand)
if not emptyRS(rstCand) then
rstcand.movelast
strLastRecord = rstcand("ADDRESS_ID")
rstcand.Close
set rstcand=nothing
end if
intcandID = Cint(strLastRecord) + 1
Response.Write intcandID
end sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|