OLEDB- DSNL less connection error

Results 1 to 4 of 4

Thread: OLEDB- DSNL less connection error

  1. #1
    Prakash.S Guest

    Default OLEDB- DSNL less connection error

    I recd. this error while trying the code given below:<BR><BR>ADODB.Connection error &#039 800a0e78&#039 <BR><BR>Invalid operation on closed object. <BR><BR>/try.asp, line 11 <BR><BR><BR>&#060;html><BR>&#060;body>hello there<BR><BR>&#060;% <BR> x = "Summa than"<BR> Response.write(x)<BR>&#037;&#062;<BR>&#060;h3>Now database records&#060;/h3><BR>&#060;%<BR>Set objConn = Server.CreateObject("ADODB.Connection")<BR>objConn .ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51; Data Source=penta4.mdb;Initial Catalog=penta4.mdb;" <BR>Set rs = objConn.execute("select * from emp")<BR>while not rs.eof<BR> Response.write("<BR>" & rs("name"))<BR> rs.movenext<BR>wend<BR>rs.close<BR>objConn.close<B R>&#037;&#062;<BR><BR>&#060;/body><BR>&#060;/html><BR><BR>Can somebody help ?

  2. #2
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: OLEDB- DSNL less connection error

    You need to open your connection to your database.<BR><BR>After objConn.ConnectionString "..."<BR>put:<BR><BR>objConn.Open<BR><BR>Happy Programming!

  3. #3
    Bruce Newcomer Guest

    Default RE: OLEDB- DSNL less connection error

    I haven&#039t done any DSN less connections, but don&#039t you need an rs.open in there somewhere.<BR>

  4. #4
    Rui Castro Guest

    Default RE: OLEDB- DSNL less connection error

    Mine is working when I only do read operations, but when I try to write to database I strange erros. It doesn&#039t happen with a system DSN, what am I doing worng?<BR><BR>Set cnConn = Server.CreateObject("ADODB.Connection")<BR>cnConn. Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=db.mdb"<BR>


Posting Permissions

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