Solved

need help about winform App with MS access

Posted on 2006-07-03
9
245 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applicationsā€¦
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the adminiā€¦
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

752 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