Solved

Database Error (urgent)

Posted on 2003-11-06
18
861 Views
Last Modified: 2013-12-20
Hi

I've got a major problem with my company Intranet in that when several people are trying to access similar pages that use the same database I get errors saying 'cannot read database - file already in use'.  It works fine if there isn't heavy traffic.  I'm using an Access database.

Should this happen?  i thought Coldfusion would be able to handle several requests at the same time.  I may be being completely niaive here - I am a newbie.

Is there anything I that I could be doing that is fundamentally wrong?  Is there anything I can do in the Coldfusion Administrator to stop this happening?

Any help gratefully recieved.

Thanks in advance.
0
Comment
Question by:nelliott
  • 6
  • 4
  • 4
  • +3
18 Comments
 
LVL 2

Assisted Solution

by:jonnygo55
jonnygo55 earned 200 total points
Comment Utility
in Cold Fusion administrator go to the ODBC Data Sources...click on the relevant one...click on CF Settings to expand the options....click on limit connections...set box to three(I think thats the max for access)...not many..think about upgrading to SQL server if your company has the money or MySQL if not
0
 
LVL 2

Expert Comment

by:jonnygo55
Comment Utility
0
 
LVL 1

Assisted Solution

by:kjuliff
kjuliff earned 200 total points
Comment Utility
Also check that no one is using the database NOT from your intranet. Is any application other than CF using it?

Also go to Datasources in the administrator and then CF Settings and make sure this is NOT checked

 Maintain database connections - Check this
box to maintain connections to data sources across client requests.
0
 
LVL 1

Expert Comment

by:kjuliff
Comment Utility
PS - THEN reboot the machine that the database resides on.
0
 
LVL 12

Expert Comment

by:jyokum
Comment Utility
someone probably has the database open in Access and has one of the tables open in design mode. If you can't hunt them down, do as kjuliff suggested... reboot the server the database resides on.
0
 
LVL 17

Accepted Solution

by:
anandkp earned 100 total points
Comment Utility
In ur CFAdmin -> Data Sources ... go to ur DSN & click on advanced settings ...
u'll see Maintain DataBase Connections - UNCHECK this !

that shld do it.

PS : kjuliff - u mentioned "Maintain database connections - Check this " - whereas it shld be unchecked - right ????

K'Rgds
Anand
0
 
LVL 10

Expert Comment

by:substand
Comment Utility
place <cftransaction> tag around your queries.
0
 

Author Comment

by:nelliott
Comment Utility
Still having problems.  I realise Access is not really set up for multi user requests, but I thought Coldfusion could cope with more than 2 people using it at the same time!  Am I right in thinking that Coldfusion should stack queries and deal with them one by one?

Within Coldfusion Administrator I have the following settings:

Data Sources

CF Data Source Name: intranet
Database File: E:\Inetpub\wwwroot\assets\db\intranet.mdb (Should this be in the System Database field? - what's the difference?)

Maintain Connectiosn is NOT checked.


Server Settings

Maximum number of simultaneous requests: 5

(Nothing else checked)


Caching Settings

'Save Class Files' and 'Cache Web Server Paths' are the only things ticked.


Each query within my cfm pages is set up as so:

<cfquery name="main_news" datasource="intranet" cachedwithin="#CreateTimeSpan(0,2,0,0)#">
SELECT ID, SUBMITTED, CATEGORY, NAME, CONTENT
FROM MAIN
WHERE CATEGORY = 'Headline News'
ORDER BY ID DESC</cfquery>


Any help gratefully recieved!!!  Thanks in advance...
0
 
LVL 17

Expert Comment

by:anandkp
Comment Utility
yes change ur DSN from USer DSN to system DSN & let me know
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:nelliott
Comment Utility
I get this error message when I tey and add the database to System DSN

Connection verification failed for data source: intranet
[]java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][SequeLink Server]Unable to retrieve error message from backend ODBC Driver.
The root cause was that: java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][SequeLink Server]Unable to retrieve error message from backend ODBC Driver.

Any ideas?
0
 
LVL 17

Expert Comment

by:anandkp
Comment Utility
what version of CF are u using ?
0
 

Author Comment

by:nelliott
Comment Utility
6.1
0
 
LVL 17

Expert Comment

by:anandkp
Comment Utility
Enterprise / Professional ?
0
 

Author Comment

by:nelliott
Comment Utility
Standard Edition Version 6.1
0
 
LVL 1

Expert Comment

by:kjuliff
Comment Utility
OK. Is the dababase on the same machine as CF? If not go to services and change the login for the CF  service to the network administrator account.
0
 

Author Comment

by:nelliott
Comment Utility
The database is on the same machine as CF.
0
 
LVL 1

Expert Comment

by:kjuliff
Comment Utility
OK. Then you shouldn't have to worry about the CF login account. The problem MAY be that it wasn't initially set up as a system
DSN.

I would do this - delete ALL dsn entries (in CF AND ODBC) for this database.

Reboot.

Set up as system DNS and limit simultaneos connections to 3.
0
 

Author Comment

by:nelliott
Comment Utility
I have run out of ideas, so I've changed the database to MySQL.  Looks to have solved the above problem, although it is bringing in it's own little problems (aaargghhh!)

Thanks for your all your help.

Points split between kjuliff, anandkp and jonnygo55
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now