| |
|
If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
|
 |

02-05-04, 05:16
|
|
Registered User
|
|
Join Date: Dec 2003
Location: Brisbane
Posts: 14
|
|
|
strange error message
|
|
I keep getting this strange error message with the following script. I am trying to access data from a database and write it to a webpage. I am using SunOne ASP.
########
ERROR MESSAGE:
########
Error Type:
Sun ONE ASP VBScript runtime (0x800A01AE)
Class does not support automation
/testing1.asp, line 11
########
SCRIPT:
########
<% @ Language="VBScript" %>
<% Option Explicit %>
<%
Dim PeopleRS, sConnString, myConn, mySQL
Set myConn= server.CreateObject("ADODB.Connection")
sConnString="DSN=database1"
myConn.Open sConnString
mySQL = "Select * from People"
Set PeopleRS = myConn.Execute(mySQL)
Response.Write "<table>"
do while not PeopleRS
Response.Write "<tr>"
Response.Write "<td>" & PeopleRS("ID").value & "</td>"
Response.Write "<td>" & PeopleRS("People").value & "</td>"
Response.Write "<td>" & PeopleRS("Comment").value & "</td>"
Response.Write "</tr>"
PeopleRS.MoveNext
loop
Response.Write "</table>"
Set PeopleRS = nothing
Set myConn = nothing
%>
|
|

02-05-04, 06:25
|
|
Registered User
|
|
Join Date: Dec 2003
Location: Brisbane
Posts: 14
|
|
|
New Error Message
Now I'm getting the following error message:
Error Type:
ADODB.Connection.1 (0x80004005)
SQLState: S1000 Native Error Code: -1045 [DataDirect][ODBC SequeLink driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Not a valid bookmark.
/testing1.asp, line 7
|
Last edited by davep23; 02-05-04 at 06:29.
|

02-05-04, 19:11
|
|
Registered User
|
|
Join Date: Dec 2003
Posts: 454
|
|
|
|
What is the difference between SunOne ASP and MS ASP?
|
|

02-05-04, 20:00
|
|
Registered User
|
|
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
|
|
for your first error wouldn't you need to change line 11 to
do while not PeopleRS.eof
??
As for the second, did you change anything in the code to cause that??
|
|

02-05-04, 21:17
|
|
Registered User
|
|
Join Date: Feb 2004
Posts: 1
|
|
Do what rokslide says
"do while not PeopleRS.eof"
then,
Try creating the recordset object after this line:
Set myConn= server.CreateObject("ADODB.Connection")
Set PeopleRS = server.CreateObject("ADODB.Recordset")
Then after you create the SQL statement, you can:
Set PeopleRS = myConn.Execute(mySQL)
Also, it is more efficient to select exactly what you want not '*'.
mySQL = "Select ID, People, Comment From People"
|
Last edited by CodeMan; 02-05-04 at 21:19.
|

02-06-04, 23:04
|
|
Registered User
|
|
Join Date: Dec 2003
Location: Brisbane
Posts: 14
|
|
|
changes to the code
Made the necessary changes to the code. Now I'm getting an error message relating to line 8
Error Type:
ADODB.Connection.1 (0x80004005)
SQLState: S1000 Native Error Code: -1045 [DataDirect][ODBC SequeLink driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Not a valid bookmark.
/testing1.asp, line 8
|
|

02-10-04, 07:10
|
|
Registered User
|
|
Join Date: Dec 2003
Location: Brisbane
Posts: 14
|
|
|
Come on guys... help me out...
Come on guys... help me out... I'm just about to give up! Any suggestions?
|
|

02-10-04, 17:28
|
|
Registered User
|
|
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
|
|
Sorry, can't help you with that one dude, I have never seen the error message before.
Is line 8 the connect line or the query line??
If it is the connect line check you ODBC/DSN details, otherwise check your database and made sure your table is correct.
|
|

04-29-09, 01:12
|
|
Registered User
|
|
Join Date: Apr 2009
Posts: 3
|
|
|
Have you got the solution
Hello,
If you got the solution for your above problem please let me know.
i am getting the same error
|
|

04-29-09, 03:38
|
|
www.gvee.co.uk
|
|
Join Date: Jan 2007
Location: UK
Posts: 10,156
|
|
You don't generally execute a recordset (SELECT statement), instead you Open() instead.
Also, your loop should read
Code:
do while not PeopleRS.EOF
...
Try this and let us know how you get on.
|
|

04-29-09, 03:52
|
|
Registered User
|
|
Join Date: Apr 2009
Posts: 3
|
|
|
Thanks Dear
Thanks a lot,
its working now
Thanks again
|
|

04-29-09, 04:19
|
|
www.gvee.co.uk
|
|
Join Date: Jan 2007
Location: UK
Posts: 10,156
|
|
Can you tell us exactly what you did to fix the issue?
It will benefit all future readers of the thread to have a final answer! 
|
|

04-29-09, 05:15
|
|
Registered User
|
|
Join Date: Apr 2009
Posts: 3
|
|
before I have declared variable like below:
set Rs=Server.CreateObject("ADODB.RecordSet")
Now i changed it to simply
set Rs=con.Execute(Sql)
and it worked
thanks 
|
|

05-04-09, 06:02
|
|
Registered User
|
|
Join Date: May 2009
Posts: 1
|
|
how to store and retrieve hindi data in sqlserver 2005? if anyone can suggest plz reply...
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|