Solved

need help about winform App with MS access

Posted on 2006-07-03
9
243 Views
Last Modified: 2010-04-16
i have a problem when working with MS access database file, i coding a application using MS access database, MS access file in application root directory, i run it in my local drive it working but when copy to network map drive it can't run, i think i it not found my MS access database, how can i resolve this problem (i copy my application directory to another machines, it working) please help me.
0
Comment
Question by:k6t
9 Comments
 
LVL 22

Expert Comment

by:Ivo Stoykov
ID: 17035175
Hello k6t,

what kind is your application - web based; sand alone?
does your application has permits to read/write to that mapped drive?
how do you try to connect to access on the mapped drive?

HTH

I
0
 

Author Comment

by:k6t
ID: 17035213
my application is stand alone windows base application, i run my application under window account that have read/write on that map drive,please help me? does we need some special steps to make it work with network drive?
0
 
LVL 22

Expert Comment

by:Ivo Stoykov
ID: 17035379
Hi k6t,

i'm guessing... but there are few things you've to check.
1. permissions
2. path
3. connection string

what error you've get?

regards

I
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:k6t
ID: 17035641
here what i did to try to resolve my problem :

- i copy my MS access database to map drive and edit connection string to absolute path like \\myserver\myappfolder\myaccessfile.mdb

- compile my program

- when i run on my localdrive it work perfect.

- remove ms access file on map drive and run again on my local drive, it raise error (because it not found ms access file on map drive)

- add ms access file to map drive

- run my app on local drive, it work again ( we can see that no problem when connect to ms access file on map drive)

- but when i copy the hole application that run perfect on local drive to map drive, it raise error

- it drive me crazy, why when we run on map drive it can't see ms access file? there are some special steps when we want run our application on network drive? thanks
0
 
LVL 22

Expert Comment

by:Ivo Stoykov
ID: 17035772
Hi k6t,

> \\myserver
try to map the drive to a letter using Windows Explorer Map Drive menu so as your address to be
Z:\myappfolder\myaccessfile.mdb instead of \\myserver\myappfolder\myaccessfile.mdb


regards

I
0
 

Author Comment

by:k6t
ID: 17035820
i tried and no thing changed, error still raise : (
0
 
LVL 2

Expert Comment

by:shy_talk
ID: 17036219
It looks like the path to the access database is saved in your application as a literal, e.g. "C:\Documents and Settings\...\My Documents\MyDatabase.mdb. When the application starts up on the network, it

To allow the application to work anywhere, you need to allow the application to search its default folders (in this case its installation folder) for the database, . To do this, find any properties, connection strings and code in your  in your application that give a folder for to the database and remove the folder information, leaving just the name of the database, e.g. "MyDatabase.mdb". That way, the application will first look for MyDatabase.mdb in its installation folder and other default folders before reporting that it cannot be found.

Hope this helps.
0
 
LVL 22

Expert Comment

by:Ivo Stoykov
ID: 17036296
Hi k6t,

what is actually the error you've get? I do not see any message...

regards

I
0
 
LVL 14

Accepted Solution

by:
jjardine earned 500 total points
ID: 17036661
.Net has security issues running from a network share.   try reading this blog http://blogs.msdn.com/shawnfa/archive/2003/06/20/57023.aspx  that might help shed some light on this.  
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

821 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