|
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..
|
|
|
|
|
|
|
|