Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Error Msg


Message #1 by "Cindy Gan" <cgan@c...> on Thu, 2 Jan 2003 22:54:07 -0500

Hi,

I am using ACCESS 2000, I need to insert info which are from web form(input
box) into the database. But I always get an error msg: Operation is not
allowed referencing a closed or a invalid connection. What does this msg
mean? Thanks.

-Cindy

Message #2 by Bimal Panda <bimal@o...> on Mon, 6 Jan 2003 01:03:14 -0800 (PST)
Hi Cindy

save the code below as an conn.inc  file.call it from the asp page you are working like.
<!--#include file="conn.inc"-->

Then see.i think this connection will work with.



<%
Set conn = Server.CreateObject("ADODB.Connection")
FilePath1 = Server.MapPath("filename.mdb")
conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & FilePath1 & ";" 
%> 




Bimal


--- "Cindy Gan" <cgan@c...> wrote:
>
>
>Hi,
>
>I am using ACCESS 2000, I need to insert info which are from web form(input
>box) into the database. But I always get an error msg: Operation is not
>allowed referencing a closed or a invalid connection. What does this msg
>mean? Thanks.
>
>-Cindy
>
>

_____________________________________________________________
http://www.on-lyne.com - Seamless Solutions Across Borders !!

_____________________________________________________________
Select your own custom email address for FREE! Get you@y... w/No Ads, 6MB, POP & more!
http://www.everyone.net/selectmail?campaign=tag
Message #3 by "Ron Williams" <ronwilliams32@c...> on Tue, 7 Jan 2003 21:24:55
Hi cindy,

the message is telling you that you need to open the connection first.  
please show us the code for a more specific answer.

the other guy responded by showing you how to open a connection object, 
but that is not correct if you are using a Command object to submit your 
INSERT query.  the code will help us give you an answer tailored to your 
problem.

ron

> 

Hi,

I am using ACCESS 2000, I need to insert info which are from web form(input
box) into the database. But I always get an error msg: Operation is not
allowed referencing a closed or a invalid connection. What does this msg
mean? Thanks.

-Cindy

Message #4 by "Cindy Gan" <cgan@c...> on Tue, 7 Jan 2003 22:58:03 -0500
Thank you, Ron. I have already fixed that problem. That was a connectivity
problem.

-----Original Message-----
From: Ron Williams [mailto:ronwilliams32@c...]
Sent: Tuesday, January 07, 2003 9:25 PM
To: ASP Databases
Subject: [asp_databases] Re: Error Msg

Hi cindy,

the message is telling you that you need to open the connection first.
please show us the code for a more specific answer.

the other guy responded by showing you how to open a connection object,
but that is not correct if you are using a Command object to submit your
INSERT query.  the code will help us give you an answer tailored to your
problem.

ron

>

Hi,

I am using ACCESS 2000, I need to insert info which are from web form(input
box) into the database. But I always get an error msg: Operation is not
allowed referencing a closed or a invalid connection. What does this msg
mean? Thanks.

-Cindy



  Return to Index