Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Error 3709 in ASP application

Avatar of dodgerfan
dodgerfanFlag for United States of America asked on
ASP
1 Comment1 Solution843 ViewsLast Modified:
I'm getting Error 3709: The connection cannot be used to perform this operation. It is either closed or invalid in this context. I cannot find where this is happening. I've included the code below. Any help is appreciated.

Dim socon as ADODB.Connection: Set socon = dbC
Dim sorec1 As ADODB.Recordset
Set sorec1 = New ADODB.Recordset
Dim cmd As ADODB.Command: Set cmd = New ADODB.Cmd
Dim socomm1 As ADODB..Connection

sorec1.Open socomm1, , , , adCmdText

l_EventID = CLng(g_eventid)
Return_Value = 0
g_CreatorID = CLng(Session("UserID"))

With cmd
  Set .ActiveConnection = socon
  .CommandText = SP_CREATEFORM
  .CommandType = adCmdStoredProc
  .Parameters.Append .CreateParameter("@Return_Value", adInteger, adParamReturnValue, , Return_Value)
  .Parameters.Append .CreateParameter("@EventID", adInteger, adParamInput, , l_EventID)
  .Parameters.Append .CreateParameter("@CreatorID", adInteger, adParamInputOutPut, , g_CreatorID)
.Execute , , adExecuteNoRecords
End With

Set sorec1 = Nothing
DropCn socon, cmd
ASKER CERTIFIED SOLUTION
Avatar of bui_trung_hieu
bui_trung_hieuFlag of Viet Nam image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 1 Comment.
See Answers