Click here to Skip to main content
15,887,683 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionSend string data to an email address Pin
Abbasy Ahmad11-Aug-08 19:16
Abbasy Ahmad11-Aug-08 19:16 
AnswerRe: Send string data to an email address Pin
Christian Graus11-Aug-08 19:31
protectorChristian Graus11-Aug-08 19:31 
Questionmaster page Pin
niki_nilu11-Aug-08 19:01
niki_nilu11-Aug-08 19:01 
AnswerRe: master page Pin
Abhijit Jana11-Aug-08 19:22
professionalAbhijit Jana11-Aug-08 19:22 
QuestionASP.Net 1.1 to 2.0 Migration Help Pin
pashitech11-Aug-08 19:00
pashitech11-Aug-08 19:00 
Questiongetting value of control Pin
kjalandoon11-Aug-08 16:27
kjalandoon11-Aug-08 16:27 
AnswerRe: getting value of control Pin
kjalandoon11-Aug-08 17:05
kjalandoon11-Aug-08 17:05 
Questionhelp with nextval in do while loop Pin
kl01070511-Aug-08 6:56
kl01070511-Aug-08 6:56 
I'm programming in classic ASP but I didn't see a forum for this so I post it here. I hope somebody can help me. Smile | :)

I have 2 tables, empID and deadEmpID. My app generates a new employee ID by getting the value of NEXTVAL (sequencial # from Oracle). The deadEmpID table contains a few numbers that we can not use as an employee ID so before inserting nextval into empID, I need to check to make sure this number is not in the deadEmpID table. When I run my program, if the new generated id is not in deadEmpID then it's fine... but if exists in deadEmpID, it keeps running until time out. What am I doing wrong here, please help!!

(When you reference the nextval from your sql statement, it increments to the next sequence # .)

getNextVal = "select emp_id_seq.nextval as NextEmpID from dual"
Do While True ' loop forever
Set oRS = oConnDB.Execute( getNextVal )
sNextEmpID = oRs("NextEmpID")
oRS.Close

' compare nextval make sure it's not in dead table
checkDead = "select deadID from deadEmpID where deadID = '" & sNextEmpID & "' "
Set oRS = oConnDB.Execute( checkDead )
If oRS.EOF Then Exit Do ' that empid not in dead table
Loop ' we'll go back and get another nextval and try again

'insert into employee table
sSQL = "insert into empID (empID, lname, fname) values (emp_id_seq.curval, '" & sLastName & "', '" & sFirstName & "')"
oConnDB.Execute(sSQL)
AnswerRe: help with nextval in do while loop Pin
Manas Bhardwaj11-Aug-08 7:22
professionalManas Bhardwaj11-Aug-08 7:22 
GeneralRe: help with nextval in do while loop Pin
kl01070511-Aug-08 8:05
kl01070511-Aug-08 8:05 
QuestionQuestion regarding 'GetPostBackEventReference' and multiple arguments Pin
Lea Hayes11-Aug-08 6:49
Lea Hayes11-Aug-08 6:49 
AnswerRe: Question regarding 'GetPostBackEventReference' and multiple arguments Pin
Lea Hayes11-Aug-08 7:58
Lea Hayes11-Aug-08 7:58 
GeneralRe: Question regarding 'GetPostBackEventReference' and multiple arguments Pin
nyeboy11-Aug-08 15:55
nyeboy11-Aug-08 15:55 
GeneralRe: Question regarding 'GetPostBackEventReference' and multiple arguments Pin
Lea Hayes12-Aug-08 0:11
Lea Hayes12-Aug-08 0:11 
GeneralRe: Question regarding 'GetPostBackEventReference' and multiple arguments Pin
nyeboy16-Aug-08 15:06
nyeboy16-Aug-08 15:06 
Questionproblem with LoadXml() Pin
salmonraju11-Aug-08 6:02
salmonraju11-Aug-08 6:02 
AnswerRe: problem with LoadXml() Pin
Manas Bhardwaj11-Aug-08 6:14
professionalManas Bhardwaj11-Aug-08 6:14 
GeneralRe: problem with LoadXml() Pin
salmonraju11-Aug-08 6:17
salmonraju11-Aug-08 6:17 
GeneralRe: problem with LoadXml() Pin
Lea Hayes11-Aug-08 6:53
Lea Hayes11-Aug-08 6:53 
GeneralRe: problem with LoadXml() Pin
salmonraju11-Aug-08 6:57
salmonraju11-Aug-08 6:57 
QuestionRadio button list,with a set of values form database. Pin
amit201111-Aug-08 5:25
amit201111-Aug-08 5:25 
AnswerRe: Radio button list,with a set of values form database. Pin
Manas Bhardwaj11-Aug-08 5:36
professionalManas Bhardwaj11-Aug-08 5:36 
GeneralRe: Radio button list,with a set of values form database. Pin
amit201111-Aug-08 5:51
amit201111-Aug-08 5:51 
AnswerRe: Radio button list,with a set of values form database. Pin
umeshdaiya11-Aug-08 5:42
umeshdaiya11-Aug-08 5:42 
Questionenlarge dropdown list control scroll bar Pin
omer erakman11-Aug-08 4:32
omer erakman11-Aug-08 4:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.