mattglet

msg:1566866 | 12:47 am on Nov 23, 2005 (gmt 0) |
This isn't really a hardware question, more of a development question. When you open a connection to a database in your code, you should be closing it when you are done with it. This practice will ensure that your connection pool will contain only the connections needed to operate your site, and consume only the needed resources as well.
|
Scally_Ally

msg:1566867 | 10:38 am on Nov 23, 2005 (gmt 0) |
Thats the wierd thing... I have checked through all of my code to make sure that i had closed all database connections and sessions that are not in use at that particular time. the error i get is provider error '80004005' unspecified error this seems a little vague to me, it is a new iis server i am using but when the site was on the old server it worked perfectly well. I am thinking that maybe it some kind of setting that maybe i have overlooked. Thanks
|
mattglet

msg:1566868 | 1:18 pm on Nov 23, 2005 (gmt 0) |
Can you post the line of code causing the error?
|
Scally_Ally

msg:1566869 | 9:32 am on Nov 24, 2005 (gmt 0) |
conn.open "DSN=myDatabase;" this is where the page falls over and the server goes wrong, on the page this is the first place any database work is started. when i get the error report from the server it says that the connection had timed out, so i will assume that that means that it couldnt create a connection within the alloted time which is 30 seconds (at least i think). In order to over ride this problem i have to restart the server. Im really lost with this, it seems to happen about once every 2 days or so. Thanks
|
mattur

msg:1566870 | 12:22 pm on Nov 25, 2005 (gmt 0) |
Assuming you're using ASP, one way to optimise ODBC connections is to not use them(!). ASP uses ADO which uses OLEDB as the data API. When you use an ODBC connection in ASP you're actually adding an extra layer to the data stack - the OLEDB to ODBC conversion. So using ODBC in ASP is like: ASP -> ADO - > OLEDB -> ODBC -> database You can optimise this by using an OLEDB connection instead: ASP -> ADO - > OLEDB -> database This is especially important when using Access as the database (are you using Access?) For more information google for oledb connection strings.
|
|