|
Thanks. However, now when I go to the page, it is not pulling it up and is giving me an HTTP error. When I cleared my code, the page appeared again. Any help with the code would be appreciated. Also, I have had most of the code in there before and it works...I am really only concerned about the if...then stuff...
str = "select max([EventID]) from Events"
Set rsTemp = server.CreateObject("ADODB.Recordset") rsTemp.open str, dbConnection strSQLInsert = "INSERT INTO Groups_Events (Events_EventID, Groups_GroupID, AttnPeriod, Groups_EventCategories_GroupEventCategoryID, NWBPUB, NWBUSR, NWBADM) "
strSQLInsert = strSQLInsert & "values (" & rsTemp(0) & "," & dict("Orig_GroupID") & ",'" & dict("Orig_AttnPeriod") & "'," & dict("Orig_GroupEventCategoryID") & "," & dict("NWBPUB") & "," & dict("NWBUSR") & "," & dict("NWBADM") & ")"
dbConnection.Execute strSQLInsert if dict("Orig_Present1") not is null then
strSQLInsert2 = "INSERT INTO Events_Clients_NoGrpAff ([Type], Events_EventID, Clients_ClientID) "
strSQLInsert2 = strSQLInsert2 & "values ('Presenter'," & rsTemp(0) & "," & dict("Orig_Present1") & ")"
dbConnection.Execute strSQLInsert2 else if dict("Orig_Present2") not is null then
strSQLInsert3 = "INSERT INTO Events_Clients_NoGrpAff ([Type], Events_EventID, Clients_ClientID) "
strSQLInsert3 = strSQLInsert3 & "values ('Presenter'," & rsTemp(0) & "," & dict("Orig_Present2") & ")"
dbConnection.Execute strSQLInsert3 else if dict("Orig_Present3") not is null then
strSQLInsert4 = "INSERT INTO Events_Clients_NoGrpAff ([Type], Events_EventID, Clients_ClientID) "
strSQLInsert4 = strSQLInsert4 & "values ('Presenter'," & rsTemp(0) & "," & dict("Orig_Present3") & ")"
dbConnection.Execute strSQLInsert4
end if strSQLUpdate = "UPDATE Events "
strSQLUpdate = strSQLUpdate & "SET Orig_GroupID = Null, Orig_AttnPeriod = Null, Orig_GroupEventCategoryID = Null "
strSQLUpdate = strSQLUpdate & "WHERE EventID = " & rsTemp(0)
dbConnection.Execute strSQLUpdate rsTemp.Close : set rsTemp = Nothing
|