Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Bug Reports (Closed)
 BUG+FIX (3.1sr5a6): Connection problems
 Forum Locked  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

gor
Retired Admin

Netherlands
5511 Posts

Posted - 18 February 2001 :  06:27:19  Show Profile  Visit gor's Homepage
in topic.asp you find this code:

Member_ID = getNewMemberNumber()
if (strAuthType = "nt") then
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
call NTauthenticate()
if (ChkAccountReg() = "1") then
call NTUser()
end if
end if

%>
<!--#INCLUDE FILE="inc_top.asp" -->
<%
with a few problems:

1) an error message because getNewMemberNumber() needs an open connection
2) there is another connection opened and never closed

The initial reason to put part of the code before the inc_top.asp is because NTUser() writes cookies, but because we use Response.buffer = TRUE this isn't a problem anymore.
The getNewMemberNumber() has to be moved after the inc_top.asp anyhow, but I would suggest changing the code to:

%>
<!--#INCLUDE FILE="inc_top.asp" -->
<%
Member_ID = getNewMemberNumber()
if (strAuthType = "nt") then
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString

call NTauthenticate()
if (ChkAccountReg() = "1") then
call NTUser()
end if
end if


thus removing one, not needed, connection to the database.

Pierre

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 18 February 2001 :  06:33:21  Show Profile  Visit HuwR's Homepage
this is actually done in quite a few of the other files too I did post a message somewhere, I'm sure Kal_corp was going to check them.

Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 18 February 2001 :  06:38:40  Show Profile  Visit gor's Homepage
My guess it that this is the cause of the "file in use" error, because you keep opening new connections, that don't get closed until they time-out.

Mike,

The error caused by getMemberNumber() was new to this Alpha, that is because the function used to open and close a new connection to the database.

Pierre
Go to Top of Page

Kerry
Average Member

USA
553 Posts

Posted - 19 February 2001 :  01:22:12  Show Profile  Visit Kerry's Homepage
Gor,

I made the prescribed change, but I see no difference in the error I'm getting when trying to access topic.asp:

Microsoft VBScript runtime error '800a01a8'
Object required: 'my_Conn'
/kerrytempstuff/inc_functions.asp, line 1737

-Kerry

Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 19 February 2001 :  01:24:49  Show Profile
you moved the <!--#INCLUDE FILE="inc_top.asp" --> like it shows?
Go to Top of Page

Kerry
Average Member

USA
553 Posts

Posted - 19 February 2001 :  01:34:32  Show Profile  Visit Kerry's Homepage
Bingo. -I had moved it, but not properly. Thanks Richard!

-Kerry

Go to Top of Page

Reinsnitz
Snitz Forums Admin

USA
3545 Posts

Posted - 19 February 2001 :  12:06:41  Show Profile  Visit Reinsnitz's Homepage  Send Reinsnitz an AOL message  Send Reinsnitz an ICQ Message  Send Reinsnitz a Yahoo! Message
mmmmmmmmmmmmmmmmmmmm... popcorn for lunch.

Reinsnitz (Mike)
><)))'>
"Therefore go and make disciples of all nations,..." Matthew 28:19a
Go to Top of Page

Reinsnitz
Snitz Forums Admin

USA
3545 Posts

Posted - 19 February 2001 :  20:38:34  Show Profile  Visit Reinsnitz's Homepage  Send Reinsnitz an AOL message  Send Reinsnitz an ICQ Message  Send Reinsnitz a Yahoo! Message
fixed in the source of sf2k_31sr5a7.zip

Reinsnitz (Mike)
><)))'>
"Therefore go and make disciples of all nations,..." Matthew 28:19a
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000 Version 3.4.07