Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - ADODB.Recordset.1 error ’80004005’
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ADODB.Recordset.1 error ’80004005’

 Post Reply Post Reply
Author
ngaisteve1 View Drop Down
Groupie
Groupie
Avatar

Joined: 26 December 2002
Location: Malaysia
Status: Offline
Points: 169
Post Options Post Options   Thanks (0) Thanks(0)   Quote ngaisteve1 Quote  Post ReplyReply Direct Link To This Post Topic: ADODB.Recordset.1 error ’80004005’
    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."

Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
skyworld View Drop Down
Senior Member
Senior Member


Joined: 12 December 2002
Location: United States
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote skyworld Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2003 at 8:39am
about getting rid of the ' before
'sql = "SELECT * FROM announcement"d
Back to Top
skyworld View Drop Down
Senior Member
Senior Member


Joined: 12 December 2002
Location: United States
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote skyworld Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2003 at 8:40am

ooops ...

 

yours:


'sql = "SELECT * FROM announcement"

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

Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
skyworld View Drop Down
Senior Member
Senior Member


Joined: 12 December 2002
Location: United States
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote skyworld Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2003 at 8:53am
atleast i tried though ...
Back to Top
ngaisteve1 View Drop Down
Groupie
Groupie
Avatar

Joined: 26 December 2002
Location: Malaysia
Status: Offline
Points: 169
Post Options Post Options   Thanks (0) Thanks(0)   Quote ngaisteve1 Quote  Post ReplyReply Direct Link To This Post 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.



Edited by ngaisteve1
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.