Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
IIS and db connection
Old 11-25-2008, 09:23 AM IIS and db connection
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
Hello All,

Having a problem and hoping someone can give some assistance!

-I am running IIS on XP pro.
- asp
-I have system DNS set up.
-Access database
-connection set up as a system DSN


When I open an asp page that pulls info from the database it works fine the first time. Then, something times out and it will not work. Even if I refresh the same page it will not refresh unless I wait at least 30 seconds or so. Then it will refresh..

Is there a setting in IIS somewhere that I need to change?

Thanks for any help.

~Chip
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
 
Register now for full access!
Old 11-25-2008, 09:31 AM Re: IIS and db connection
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,520
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
sounds like you have a session that is holding the database open.

Try using a connection string.
Make sure that the DB connection is closed and set to nothing as soon as the query is complete.
DO NOT pass a recordset object to a session object\variable.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-25-2008, 09:41 AM Re: IIS and db connection
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
Hi Chris. Thanks for the fast response..!

I'll give this a try and see what happens.

I wasn't sure if you looked at this forum. Glad you do..!

I'll post the results.

Thanks

~Chip
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
Old 11-25-2008, 10:32 AM Re: IIS and db connection
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
That seems to be fixing things. Now my Update statements are not working.

To explain what happen: I set this site up on a server running MS 2003 on it. Everything working great. For some reason the IT guys had to pull server 2003 off the machine and installed in ts place xp pro.

Here is the error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.


Code:
Dim objConn, objRS, strQ
Dim strConnection
Set objConn = Server.CreateObject("ADODB.Connection")
strConnection = "DSN=wb1;"
objConn.Open strConnection
Set objRS = Server.CreateObject("ADODB.Recordset")
Set objRS.ActiveConnection  = ObjConn
strQ = "UPDATE Instructor SET Crew1 = '"
strQ = strQ & strFormCrew1
strQ = strQ & "', Crew1C = '"
strQ = strQ & strFormCrew1C
strQ = strQ & "', Crew2 = '"
strQ = strQ & strFormCrew2
strQ = strQ & "', Crew2C = '"
strQ = strQ & strFormCrew2C
strQ = strQ & "', Crew3 = '"
strQ = strQ & strFormCrew3
strQ = strQ & "', Crew3C = '"
strQ = strQ & strFormCrew3C
strQ = strQ & "', SimDate = '"
strQ = strQ & strFormSimDate
strQ = strQ & "', CallSign = '"
strQ = strQ & strFormCallSign
strQ = strQ & "', TimeIn = '"
strQ = strQ & strFormTimeIn
strQ = strQ & "', TimeOut = '"
strQ = strQ & strFormTimeOut
strQ = strQ & "', SimNo = '"
strQ = strQ & strFormSimNo
strQ = strQ & "', Session = '"
strQ = strQ & strFormSession
strQ = strQ & "' WHERE InstID=" 
strQ = strQ & strFormInstID
strQ = strQ & ";"
objRS.Open strQ
What is different between 2003 and xp ... ??

This is not going to be a good day..!

Thanks,

~Chip
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
Old 11-25-2008, 10:45 AM Re: IIS and db connection
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,520
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
use

Code:
objConn.Open
objRS.Execute(strQ)
objConn.Close
set conn = nothing
for an INSERT \ UPDATE \ DELETE

It releases the DB quicker (important for Access)
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-26-2008, 12:48 PM Re: IIS and db connection
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
Tried it all and cannot get any page that has either an INSERT or UPDATE to work..!

These pages worked when server 2003 was running. Just won't work with xp pro...

any other ideas..?


Thanks,

~Chip
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
Old 11-27-2008, 08:37 PM Re: IIS and db connection
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,520
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.w3schools.com/ado/prop_rs_cursortype.asp
http://www.w3schools.com/ado/prop_rs_locktype.asp

set the cursortype to adOpenKeyset and locktype to adLockOptimistic
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to IIS and db connection
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.24889 seconds with 12 queries