Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

more connection questions for Access on a server-

Status
Not open for further replies.

treviboy

Programmer
Dec 18, 2006
70
US
I have an asp.net application on a server. I am referring to the database which lives on the "d:" drive on that particular server, so I thought I would refer to it as such in a connection string like this:
AcString = "provider = microsoft.jet.oledb.4.0; data source=d:\databases\Personnel\Substitute\substituteFE.mdb"

It tells me that the database is not there, or it is being accessed by somebody else. Nobody else is using it except me. How do I fix this problem? Is this related to how I set up security on the application? Any tips would be appreciated. thanks again.
 
thanks Mark. I fixed my problem for the most-part, but in some pages it still tries to refer to an old reference i had to an "s:" drive. can't find it anywhere. I agree that I would have used sql server but it wasn't my choice. thank you.
 
If you are developing this application to be used in a professional capacity, then I think you should highlight the problems it may cause. SQL Server offers a free version as well so there's no reason to be using access.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
trev - good advice re: moving over to SQL; a typical connection string for access would look like:
Code:
Dim cnn As OleDbConnection = New OleDbConnection( _
 "Provider=Microsoft.Jet.OLEDB.4.0; " & _
 "Data Source=" & Server.MapPath("fpdb\Sites.mdb;"))
Perhaps using the Server.MapPath may make a difference.
 
Thank you both. I know it's a better way to go. I haven't had anybody say otherwise. It's a matter of convincing the people here- it'll be tough unfortunately.
 
If you want to connect to an Access database on a server, it's simple. You just use the \\servername\foldername notation.

So if the server name is called companyserver and the database is located on the database folder...


\\companyserver\databases\Personnel\Substitute\substituteFE.mdb

And Access works fine for desktop applications. It's not the toy people make it out to be. In fact, Windows and Office often uses an .mdb to store data behind the scenes.
 
However, since this is a web app, you'd probably want to store it in the App_Data folder of your virtual directory. Then you can use syntax similar to the example Isadore showed.

I'm not understanding why people are trashing Access. I've used it for applications up to 50 concurrent users. And you'd be surprised how many "professional" applications are out there with Access storing the data.

A lot of people trash it because either they have never used it or don't know the best way to create an application with it.

If I had a choice, I'd probably use the SQL Server Express but if the requirements say Access, it should do the job unless you are going to have a lot of concurrent users.
 
I'm not understanding why people are trashing Access. I've used it for applications up to 50 concurrent users. And you'd be surprised how many "professional" applications are out there with Access storing the data.
I've also had it fall over consistently with a minimal amount of users. Excluding 2007, which I've never used in a web environment, it can cause problems that you simply don't get in SQL Server (how many times have you seen a bloated database where a "compact and repair" drops the size by as much as 70%?) If the option exists, it should use it automatically, which it doesn't, or handle the size better. Have you also tried speed comparisions between the two? If you have, you'll have probably found that a combination of the provider, the structure and the functions available make SQL Server a faster choice.

As for the "professional" applications, how have you defined "professional"? Is it just because it's a big company? Or do you mean developed by a professional? I ask because I see a lot of big companies developing applications that have big potential issues but that doesn't mean it's right and professional just because they do it. For example, take a look at Microsoft and Google. Both their websites don't comply to official web standards and in Microsoft's case some of their pages don't even display correctly in web compliant browsers! I wouldn't call that professional even though they are a big name.

A lot of people trash it because either they have never used it or don't know the best way to create an application with it.
I have used it so I'm not in the first group and I hope I'm not in the second group since the equivilant database in SQL Server was faster, smaller, more robust, more secure and easier to maintain. I think the combination of all of these should help peple decide what is the better choice of database.

To sum it up, as they both offer a free solution, and SQL Server is the better of the two as a database, I can't see any reason not to use it.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
Oh, and in the past (this was said at the time when Office 2003 was coming out) MS said:
Microsoft said:
we recommend that Microsoft Access be used solely for development purposes and not for production. Microsoft Access was designed as a single-user desktop database, and not for server use. When multiple, concurrent users make requests of a Microsoft Access database, unpredictable results may occur.
and whilst it's not entirely true that it can't run in a server environment, it can still cause problems that can easily be avoided.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
treviboy,

I will also add that if you wish to babysit your application at all levels then use access. but as ca8msm said using that type of BE DB in a web app just simply is not the best way to go. not only will you have performance issue's but you will run into record locks as well.

sorry for the late response...don't mean to drag this on.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top