Results 1 to 14 of 14
  1. #1
    Join Date
    Dec 2003
    Location
    Brisbane
    Posts
    14

    Unanswered: 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
    %>

  2. #2
    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 07:29.

  3. #3
    Join Date
    Dec 2003
    Posts
    454
    What is the difference between SunOne ASP and MS ASP?

  4. #4
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    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??

  5. #5
    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 22:19.

  6. #6
    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

  7. #7
    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?

  8. #8
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    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.

  9. #9
    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

  10. #10
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    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.
    George
    Home | Blog

  11. #11
    Join Date
    Apr 2009
    Posts
    3

    Thanks Dear

    Thanks a lot,
    its working now
    Thanks again

  12. #12
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    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!
    George
    Home | Blog

  13. #13
    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

  14. #14
    Join Date
    May 2009
    Posts
    1
    how to store and retrieve hindi data in sqlserver 2005? if anyone can suggest plz reply...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •