codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Operation is not allowed when the object is closed.  yhng81 at 09:40 on Friday, March 12, 2004
 

when i'm trying 2 call the com object which is used 2 insert member profile in2 table, fr my asp.net page..i got this error:

Operation is not allowed when the object is closed.
Description:
An unhandled exception occurred during theexecution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Operation is not allowed when the object is closed.

I have no idea at all with wat's went wrong wif my asp.net code..is tht the problem wif my asp.net code or com object code?so can any1 help me 2 figure out wat's wrong with it?

btw, here is my codes:

Sub LinkButton1_Click( s As Object, e As EventArgs)
Dim ObjNewMember
Dim WTCn
Dim Cn

Cn = Server.CreateObject("ADODB.Connection")
Cn = "DRIVER={SQL Server};SERVER=(local);UID=sa;PWD=;DATABASE=pubs;"

Dim ObjNewMember
ObjNewMember = Server.CreateObject("Hotel.NewMember")
objNewMember.CnStr = Cn

If ObjNewMember.NewFIT(CStr(Request("txtEmail")), CStr(Request("txtFirstName")), CStr(Request("txtMidName")), _
CStr(Request("txtLastName")), CInt(Request("cmbTravellerType")), CStr(Request("txtBillAdd1")), _
CStr(Request("txtBillAdd2")), CStr(Request("txtCity")), CStr(Request("dState")), _
CStr(Request("cmbCountry")), CStr(Request("txtZIP")), CStr(Request("txtHomePhone"))) = 0 Then

Response.Redirect ("/forum/AddCredit.html")
Else
Response.Write ("Error")
End If

Hopefully can get a solution from your guys..thanx..










CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: onload event
•  Active Widgets
•  Re: onmouseover change image and text
•  Line Printer Interface
•  import contacts of msn/yahoo
•  Call windows apps from web apps
•  Re: ASP.NET web controls
•  netscape 6 browser problem
•  Re: Print .doc file from the website using System.Diagnostics.Process


Recent Articles
Communicating with the Database (Using ADO)
MagicGrid
Simple Thumbnail Browsing Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2005