[tt]
Ok guys, here's what I've been breaking my head on all day today and can't figure it out.
I'm going to try to use this approach because everything else has failed, and you tell me if you think it will work or not.
Using DW4, I have added this server behavior to my page where I can check if a user name already exists in my database, I'm using the same IDEA and applied to a Start Date Field with me so far? cool.
What I'm trying to do now is add the other 2 fields (the EndDate Field and DATE fields) and checking all three fieldsto the check username behavior
<%
' *** Redirect if username exists
MM_flag="MM_insert"
If (CStr(Request(MM_flag)) <> ""
Then
MM_dupKeyRedirect="goback.asp"
MM_rsKeyConnection=MM_conferenceroom_STRING
MM_dupKeyUsernameValue = CStr(Request.Form("starttime"
)
MM_dupKeySQL="SELECT starttime FROM Requests WHERE starttime='" & MM_dupKeyUsernameValue & "'"
MM_adodbRecordset="ADODB.Recordset"
set MM_rsKey=Server.CreateObject(MM_adodbRecordset)
MM_rsKey.ActiveConnection=MM_rsKeyConnection
MM_rsKey.Source=MM_dupKeySQL
MM_rsKey.CursorType=0
MM_rsKey.CursorLocation=2
MM_rsKey.LockType=3
MM_rsKey.Open
If Not MM_rsKey.EOF Or Not MM_rsKey.BOF Then
' the username was found - can not add the requested username
MM_qsChar = "?"
If (InStr(1,MM_dupKeyRedirect,"?"
>= 1) Then MM_qsChar = "&"
MM_dupKeyRedirect = MM_dupKeyRedirect & MM_qsChar & "requsername=" & MM_dupKeyUsernameValue
Response.Redirect(MM_dupKeyRedirect)
End If
MM_rsKey.Close
End If
%>
<%
<%=Tony%>
Ok guys, here's what I've been breaking my head on all day today and can't figure it out.
I'm going to try to use this approach because everything else has failed, and you tell me if you think it will work or not.
Using DW4, I have added this server behavior to my page where I can check if a user name already exists in my database, I'm using the same IDEA and applied to a Start Date Field with me so far? cool.
What I'm trying to do now is add the other 2 fields (the EndDate Field and DATE fields) and checking all three fieldsto the check username behavior
<%
' *** Redirect if username exists
MM_flag="MM_insert"
If (CStr(Request(MM_flag)) <> ""
MM_dupKeyRedirect="goback.asp"
MM_rsKeyConnection=MM_conferenceroom_STRING
MM_dupKeyUsernameValue = CStr(Request.Form("starttime"
MM_dupKeySQL="SELECT starttime FROM Requests WHERE starttime='" & MM_dupKeyUsernameValue & "'"
MM_adodbRecordset="ADODB.Recordset"
set MM_rsKey=Server.CreateObject(MM_adodbRecordset)
MM_rsKey.ActiveConnection=MM_rsKeyConnection
MM_rsKey.Source=MM_dupKeySQL
MM_rsKey.CursorType=0
MM_rsKey.CursorLocation=2
MM_rsKey.LockType=3
MM_rsKey.Open
If Not MM_rsKey.EOF Or Not MM_rsKey.BOF Then
' the username was found - can not add the requested username
MM_qsChar = "?"
If (InStr(1,MM_dupKeyRedirect,"?"
MM_dupKeyRedirect = MM_dupKeyRedirect & MM_qsChar & "requsername=" & MM_dupKeyUsernameValue
Response.Redirect(MM_dupKeyRedirect)
End If
MM_rsKey.Close
End If
%>
<%
<%=Tony%>


