locked
Access 2000 > error code 800a0e78 RRS feed

  • Question

  • Dear all.

    I worte Access code for My company's interanet. Unfortunatyle, there is a error as below:

    ---------------

    ADODB.Recordset

    error '800a0e78'

    Operation is not allowed when the object is closed.

    ----------------

    I guess what the problem is.  If I create the query with the field, 'bk_oname', and there is Japaness charector into the field, bk_oname, the message is appeared.

    Colud somebody help me?

    There is the sample ASP code. (I'm so said that I cannot attach the sample code and mdb file)

    -----------

    <%@
    CodePage=65001 %>

    <!DOCTYPE HTML
    PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

    <html><head>

    <meta
    http-equiv="content-type" content="text/html; charset=utf-8">

    <title>Test
    Japanese Data</title>

    </head>

    <body>


    <%

    dbPxdIntra="Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source=D:\pxdintra\pxdintra1.mdb;Persist Security Info=False;"


    Set objConn =
    Server.CreateObject("ADODB.Connection")

    Set rs =
    Server.CreateObject("ADODB.Recordset")


    sql1 = "select *
    from books where bk_name like '%차트%'"

    sql2 = "select *
    from books where bk_oname like '%차트%'"


    rs.Open sql1,
    dbPxdIntra


        Do While Not rs.EOF

    Response.Write(rs("bk_name")&"<br
    />")

     
    rs.MoveNext

    Loop


    rs.Close


    %>

    </body></html>

    -----------

    Best regards.

    Monday, November 19, 2012 8:36 AM

All replies

  • Hi Wodory,

    I think you should always check the state property of the recordset before you call the close() method of the recordset.

    If rs.State > 0 Then
     rs.Close()
    End If

    and try to use "SET NOCOUNT ON", please.

    Friday, November 30, 2012 3:13 PM
  • Thank you for your reply.

    However, the guide you wrote cannot solve my problem. :-(

    I sent the db file and ASP source that you can reproduce the problem to Technet customer service of MS Korea.

    Please review the problme.

    Best regards.

    Thursday, December 13, 2012 5:17 AM
  • Hi Wodory,

    I can not see that objConn  was opened.

    [Accessing a Database from an ASP Page]

    The common way to access a database from inside an ASP page is to:

    1. Create an ADO connection to a database
    2. Open the database connection
    3. Create an ADO recordset
    4. Open the recordset
    5. Extract the data you need from the recordset
    6. Close the recordset
    7. Close the connection

    [Reference]

    create an ADO SQL Recordset

    <%@ CodePage=65001 %>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>Test Japanese Data</title> </head> <body> <% set conn=Server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open "D:\pxdintra\pxdintra1.mdb" set rs = Server.CreateObject("ADODB.recordset") rs.Open "select * from books where bk_name like '%차트%'", conn If Not rs.EOF Then Do While Not rs.EOF Response.Write(rs("bk_name") & "<br />") rs.MoveNext() Loop End If rs.Close() conn.Clse() %> </body></html>

    Friday, December 14, 2012 8:28 AM