Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4893
  • Last Modified:

ExecuteReader requires an open and available Connection. The connection's current state is Closed.

ExecuteReader requires an open and available Connection. The connection's current state is Closed.

My asp code works fine on my server and 3 other computers.
except for the production server!
now why is that?

the only difference is that the production server does not have msoffice,
is that required?

what do i need?

im using OLEDB to connect to msaccess, do i need that file?

what to do next?

2 possibility i think
1 - it cant find the DB
2 - a file or dll is needed.
0
Jerry_Pang
Asked:
Jerry_Pang
  • 3
  • 3
2 Solutions
 
mmarinovCommented:
Hi Jerry_Pang,

can you post the connection string ?

Regards!
B..M
0
 
Jerry_PangAuthor Commented:
Me.pvtDbPath gets data from webconfig.
i put my database in d:\database\database.mdb
app_db in webconfig is already "d:\database\database.mdb"


        Private Sub BuildString()
            Me.pvtConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;" _
                      & "User ID=" & Me.pvtUID & ";" _
                      & "Data Source=" & Me.pvtDbPath & ";" _
                      & "Jet OLEDB:Database Password=" & Me.pvtPwd & ";"
        End Sub

this connectstring is working in any computer except on our production server.
mdac version in production server is 2.53.6200.1
this computer that im using(currently my application works) is 2.80.1022.0

does that matter?
0
 
etmendzCommented:
MDAC version matters. So make then match.

Check also if D:\database has access rights to the account used by ASP (MACHINENAME\IUSR_MACHINENAME and INTERACTIVE if the former is not enough). Do the same to the Temp directories. In Windows Explorer, right click on a folder, Properties, Security tab...

Have fun.
0
Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

 
mmarinovCommented:
first - check if the aspnet user has permissions on the database ( not group everyone, aspnet user )
second, check where do you receive the error ( on wich line )

B..M
0
 
Jerry_PangAuthor Commented:
here's what i think is happening.

my app is using OLEDB Jet 4.0

i  dont think that the server has support for Jet4.0

how do i make sure that it does not?

http://www.microsoft.com/downloads/details.aspx?familyid=1e268b39-533e-48b0-b8d7-1781befde1f8&displaylang=en
is the download for the Jet4.0

what do you think?
0
 
mmarinovCommented:
0
 
Jerry_PangAuthor Commented:
it needs the latest mdac.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now