Print Page | Close Window

ADODB.Recordset.1 error ’80004005’

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=340
Printed Date: 29 March 2026 at 7:45pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: ADODB.Recordset.1 error ’80004005’
Posted By: ngaisteve1
Subject: ADODB.Recordset.1 error ’80004005’
Date Posted: 20 February 2003 at 3:31am

ADODB.Recordset.1 error '80004005'

SQLState: 42000
Native Error Code: 1064
[TCX][MyODBC]You have an error in your SQL syntax near '' at line 1


/intra2003/announcement_add.asp, line 15

I don't know why I got this error. I can't locate where is the error.

tmpTitle = request.form("ann_title_fr")
tmpContent = request.form("ann_content_fr")
tmpFrom = request.form("ann_from_fr")

Dim conn 'declare connection object.
Dim rs
Dim conString 'declare a temp object.

Session.timeout = 15

set conn = Server.CreateObject("ADODB.Connection") 'create connection object.
set rs = Server.CreateObject("ADODB.Recordset") 'create connection object.
set Session("MyDB_conn") = conn 'set a session timeout.

conString = "Driver={Mysql};Server=localhost; Database=intranet;UID=citylink; PWD=city12017;"
conn.Open( conString ) 'open the connection object to connect to citylink database.

'sql = "SELECT * FROM announcement"
rs.Open "announcement", conn, 3, 3

rs.addnew

rs("title") = tmpTitle
rs("content") = tmpContent
rs("from") = tmpFrom

rs.update
response.write "Done."




Replies:
Posted By: MorningZ
Date Posted: 20 February 2003 at 8:32am
Regarding:
rs.Open "announcement", conn, 3, 3

is "annoucement" a stored procedure of some sort?


-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: skyworld
Date Posted: 20 February 2003 at 8:39am
about getting rid of the ' before
'sql = "SELECT * FROM announcement"d


Posted By: skyworld
Date Posted: 20 February 2003 at 8:40am

ooops ...

 

yours:


'sql = "SELECT * FROM announcement"

Should be...
sql = "SELECT * FROM announcement"



Posted By: MorningZ
Date Posted: 20 February 2003 at 8:48am
not sure how you thought that would help, from that point forward there is no reference to the variable "sql"

-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: skyworld
Date Posted: 20 February 2003 at 8:53am
atleast i tried though ...


Posted By: ngaisteve1
Date Posted: 20 February 2003 at 7:41pm

Actually, I found out the problem later.

rs("from") = tmpFrom

I got a reserved word (from) for my field.

After I took this out, it works.

Thanks nevertheless.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net