Is this proper?
am 04.05.2005 02:25:23 von Ron Smith--0-893962048-1115166323=:43779
Content-Type: text/plain; charset=us-ascii
I made the suggested changes, but still get this annoying error:
Error Type:
ADODB.Recordset (0x800A0E78)
Operation is not allowed when the object is closed.
/writing_table_contents/friends_submit_form.asp, line 61 <==== see further down
The following is from the ASP page:
dim name, address, city, state, zip, phone, objConn, objRS, sql
name=request.Form("name")
address=request.Form("address")
city=request.Form("city")
state=request.Form("state")
zip=request.Form("zip")
phone=request.Form("phone")
set objConn=server.CreateObject("adodb.Connection")
' the next two lines are really all on one line
objConn.connectionString="driver={MySQL ODBC 3.51 Driver};Server=localhost;database=friends_contact_info"
objConn.open
set objRS=server.CreateObject("adodb.Recordset")
objRS.Open "friends", objConn, , 3 , 2
' the following is all one one line:
sql="insert into friends_contact_info.friends (Name, StreetAddress, City, State, ZipCode, PhoneNumber) values ('"&name&"', '"&address&"', '"&city&"', '"&state&"', '"&zip&"', '"&phone&"')"
set objRS=objConn.execute(sql)
objRS.close <=========== Line 61
set objRS=nothing
objConn.close
set objConn=nothing
The record goes in OK, but, it seems I can't avoid the error unless *all* four lines are commented out.
As per instructions, I have un-quoted the word: nothing, but still get the error. Is there any way to close without an error. I just want to cross my tees and dot my eyes. :-)
Oh! Yes, I'm running MySQL on WinXPpro using ASP pages on localhost.
TIA
Ron
Daniel da Veiga
Without knowing the error message it is difficult for us to help,
could you post the exact error you get? What kind of tables are you
using? And what is the MySQL server version? Is is running on a
Windows platform? Are you using ASP.Net?
If you comment that lines you'll get warnings cause MySQL will
forcelly close all open connections iddle for more than the
wait_timeout and interactive_timeout variables, besides, your objects
will not free the memory used, that can be dangerous after some time
and maybe cause unexpected behavior.
On 5/3/05, PF: MySQL wrote:
> >
> > 'objRS.close
> > ' set objRS="nothing"
> > 'objConn.close
> > ' set objConn="nothing"
>
> Set object = Nothing (no quotes)
>
> set objRS = Nothing
>
> Always set objects to nothing when you are done with them.
>
> -Kevin
>
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe: http://lists.mysql.com/win32?unsub=danieldaveiga@gmail.com
>
>
--
Daniel da Veiga
Computer Operator - RS - Brazil
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=geeksatlarge@yahoo.com
--0-893962048-1115166323=:43779--