|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Can anyone tell me whats wrong with this code??
The problem (i think!?!) is in the Conn.Execute ("INSERT... line because it works when i take this line out? I get an HTTP 500: Internal Server Error? Thank you all very much!!! Code:
<%
username =request("username")
password =request("password")
checkpass=request("checkpass")
email =request("email")
uname =request("uname")
telephone =request("telephone")
if username ="" OR password = "" OR checkpass = "" OR email = "" then
message = "Sorry but you do not seem to have filled in all the required fields, please press back to try again"
Else
if password <> checkpass then
message = "Sorry but the password you entered was different to the confirmation password, please press back to try again"
Else
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open Application("Database3_ConnectionString")
Set RS = Conn.Execute ("SELECT * From MemberTable WHERE username = '" & username & "'")
Do until RS.EOF
pass = RS("Password")
RS.MoveNext
loop
RS.Close
IF pass <> "" Then
message = "Sorry this username already exists, please press back to try again"
Else
Set RSu = Conn.Execute ("SELECT * From MemberTable")
do until RSu.EOF
lastmember = RSu("userid")
RSu.Movenext
loop
RSu.close
userid = lastmember+1
Conn.Execute ("INSERT into MemberTable (userid, username, password, email, uname, telephone) Values ('"&userid&"', '"&username&"', '"&password&"', '"&email&"','"&uname&"','"&telephone&"')")
message = "Thank you for registering"
End IF
End If
End If
%>
|
|
#2
|
||||
|
||||
|
if you're using IE, turn off 'Show Friendly Error Messages' and let's see if we get a better error message.
__________________
Come JOIN the party!!! Quote of the Month: Retirement: Because you've given so much of yourself to the company that you don't have anything left we can use. Questions to Ponder: What do you do when you see an endangered animal eating an endangered plant? iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright© 2008 sbenj69 |
|
#3
|
|||
|
|||
|
OK I got this?...
Microsoft JET Database Engine error '80040e14' Syntax error in INSERT INTO statement. /welcome.asp, line 34 |
|
#4
|
|||
|
|||
|
Got it...
"the use of a SQL or Access (if using Access) keyword as a table name or field name." works now ...thanks anyway!! ![]() |
|
#5
|
||||
|
||||
|
glad you got it working ....
|
![]() |
| Viewing: ASP Free Forums > Other > Programming Help > please help im going mad! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|