Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 error '80040e14'
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

DarkDrift
Junior Member

USA
126 Posts

Posted - 04 January 2005 :  19:29:33  Show Profile  Visit DarkDrift's Homepage  Send DarkDrift an AOL message
This is what i don't get i used this EXACT same code just changed the Request.Form names and the Table names and this is what i get:
Microsoft JET Database Engine error '80040e14'

Syntax error in INSERT INTO statement.

/dev/traderfeedback/post_succ.asp, line 69

Line 69 Would be

rsIU.execute(strSql)


Here is the Full SQL Statement

set rsIU=Server.Createobject("ADODB.Connection")
		rsIU.open(strConnString)
Function lString(string)
	 if string = "" then string = " "
	 lString = Replace(string, "'", "''")
End Function
			'REGISTER SQL
	strSql = "INSERT INTO USER ([U_NAME],[UA_IP]) VALUES(" & _
	 "'" & lString(Request.Form("UA_IP")) & "'," & _
	 "'" & lString(Request.Form("UNAME")) & "')"
	 
	 rsIU.execute(strSql)
	 
Response.Write("<h1 align=""center"">Welcome!</h1>")
Response.Write	"<h3 align=""center"">Thank you for choosing **************.com you may now log in with your new"	& vbNewline & _
			"Login ID and Password"	& VbNewLine
	 
	 rsIU.close
	 set rsIU = nothing


I include the files:
<!--#INCLUDE File="./config.asp" -->
<!--#INCLUDE File="./inc_functions.asp" -->
<!--#INCLUDE FIle="./inc_top.asp" -->


NOTE: I use the final version where Passwords are not encoded because i use the base snitz code for the site... I think it is like 3.0 Final

I don't get the site the same page sometimes i will have to do the rs.open(strConnString) and all of that jubberish. I should only have to do rs.execute(strsql) after the statment or rs.open strsql, my_conn after the statement... I am confused


When i add

Response.Write(strSql)


I get this

INSERT INTO USER ([U_NAME],[UA_IP]) VALUES(' ','0')

http://www.xcalliber.com - The Future of Boards

Edited by - DarkDrift on 04 January 2005 19:36:13

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 04 January 2005 :  20:42:04  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
I think user is an SQL reserved word... try putting brackets around it or renaming the table.

-Stim
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 04 January 2005 :  22:39:23  Show Profile  Visit dayve's Homepage
quote:
Originally posted by Da_Stimulator

I think user is an SQL reserved word... try putting brackets around it or renaming the table.


no, it's fine to use the table name USER.

quote:

INSERT INTO USER ([U_NAME],[UA_IP]) VALUES(' ','0')



there is nothing wrong with this statement unless the value you were trying to insert had a single quote or the field type was incorrect.

Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 04 January 2005 :  22:41:00  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
if UA_IP is a number field, remove the single quotes from around the value...

-Stim
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 05 January 2005 :  03:44:16  Show Profile
I've had problems with an identifier called "user" in some situations.

Put brackets around user in your sql anyway, it won't hurt anything.


======
Doug G
======
Computer history and help at www.dougscode.com
Go to Top of Page

DarkDrift
Junior Member

USA
126 Posts

Posted - 05 January 2005 :  10:13:23  Show Profile  Visit DarkDrift's Homepage  Send DarkDrift an AOL message
I do always but yes i changed it to SITE_COMP and it works :) THanks for your help

http://www.xcalliber.com - The Future of Boards
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.34 seconds. Powered By: Snitz Forums 2000 Version 3.4.07