Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / ADO.NET / January 2006

Tip: Looking for answers? Try searching our database.

connect remote Access database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
wind - 23 Dec 2005 03:41 GMT
Hello

I want to ask how to connect a vb.net window client application to a remote
MS Access databae which is located on a server?
How to set the connection string in order to do so?

Thank you
Cor Ligthert [MVP] - 23 Dec 2005 09:30 GMT
Chase,

You will have to create a shared folder and set that on every individual
computer (and give those using that rights in that shared folder)

An Jet Database is not a database server it is more a databasefile.

I hope this helps,

Cor
Frans Bouma [C# MVP] - 23 Dec 2005 09:35 GMT
> Hello
>
> I want to ask how to connect a vb.net window client application to a
> remote MS Access databae which is located on a server?
> How to set the connection string in order to do so?

    MS Access doesn't have a 'server' service, it's just a driver which
accesses a file. So if you want to access an .mdb file on a server, you
have to share that .mdb file using a shared folder, map that folder to
a drive letter (or use \\servername\folder\mydatabase.mdb) and then use
that drive + foldername to specify where the .mdb file is located.

        Frans

Signature

------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------

Paul Clement - 23 Dec 2005 13:16 GMT
¤ Hello
¤
¤ I want to ask how to connect a vb.net window client application to a remote
¤ MS Access databae which is located on a server?
¤ How to set the connection string in order to do so?

It's no different when accessing a file on a network share. Just use the UNC naming convention for
the path to the file as Frans mentioned.

Also keep in mind that all users accessing the database will require full permissions to the folder
where the database file is located.

Paul
~~~~
Microsoft MVP (Visual Basic)
wind - 23 Dec 2005 15:00 GMT
Thanks all

But I have a problem, that is, after I mapped the drive to local pc and
access it, every time I read a record, it will automatically download the
whole .mdb file once. And every time I save a record, it will automatically
upload the whole .mdb file once. This is a big big problem. So I don't know
how to do.

"Paul Clement" <UseAdddressAtEndofMessage@swspectrum.com>
???????:h1unq11ldsve4ghgj8jofu42524b3edejr@4ax.com...

> ¤ Hello
> ¤
[quoted text clipped - 14 lines]
> ~~~~
> Microsoft MVP (Visual Basic)
Cor Ligthert [MVP] - 23 Dec 2005 16:37 GMT
Wind

You say up and download, do you mean that you want to do from a webpage
(aspx). That you can forget if it is outside your domain.

Cor
wind - 24 Dec 2005 03:04 GMT
Cor

no. i mean from a window client application. After i mapped the local drive
to a remote server, i can set the connect string as "Data
Source=\\folder\xxx.mdb". But it doesn't like i map to a local area network,
it need to upload and download the whole file when i read and save a record
everytime.
Someone said I can only setup a VPN in order to prevent this problem, is it
correct?
And will it be the problem that the server is only a FTP server?

Thanks
Wind

"Cor Ligthert [MVP]" <notmyfirstname@planet.nl> ¼¶¼g©ó¶l¥ó·s»D:%23QQsl89BGHA.2356@tk2msftngp13.phx.gbl...
> Wind
>
> You say up and download, do you mean that you want to do from a webpage
> (aspx). That you can forget if it is outside your domain.
>
> Cor
Frans Bouma [C# MVP] - 24 Dec 2005 09:10 GMT
> Cor
>
[quoted text clipped - 6 lines]
> is it correct?
> And will it be the problem that the server is only a FTP server?

    The driver for access, the code that actually does the 'db logic' is
running on the client pc. The data is in a file, and it reads the
'file' to be able to perform the db operations. If you don't want that,
the only option you have is to create a service on the server which
performs the db actions and sends the results to the client. This is
easily done using remoting or by creating a webservice.

        FB

> Thanks
> Wind
[quoted text clipped - 5 lines]
> > You say up and download, do you mean that you want to do from a
> > webpage (aspx). That you can forget if it is outside your domain.

Signature

------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------

Cor Ligthert [MVP] - 24 Dec 2005 09:37 GMT
Wind,

I agree with Frans where I would because it simplicity go for the
webservice.

Your alternative is the SQL Server Express, be aware that it is limited in
use and that it his hard to maintenance as databaseserver withouth the SQL
full tools. (I saw that there is an upcomming tool for that on this page)

http://msdn.microsoft.com/sql/express/

I hope this helps,

Cor
wind - 24 Dec 2005 10:06 GMT
But I have finished coding... If i use remoting or webservice as FB mention,
do i need to do much changes? I have no idea what they are.

Thanks
Wind

"Cor Ligthert [MVP]" <notmyfirstname@planet.nl> ¼¶¼g©ó¶l¥ó·s»D:eYSZL2GCGHA.1028@TK2MSFTNGP11.phx.gbl...
> Wind,
>
[quoted text clipped - 10 lines]
>
> Cor
Cor Ligthert [MVP] - 24 Dec 2005 11:39 GMT
That depends,

See this walkthrough, in my opinion the best on MSDN

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/v
bwlkCreatingDistributedWebApplicationWalkthrough.asp


Maybe can this give you as well some idea,s that the dataset is read from
disk direct instead filled by the dataadapter from access is of course a
detail.

http://www.vb-tips.com/default.aspx?ID=0c1491cc-bed8-4525-b2b2-dd138c31a825

I hope this helps,

Cor
Paul Clement - 27 Dec 2005 15:58 GMT
¤ Thanks all
¤
¤ But I have a problem, that is, after I mapped the drive to local pc and
¤ access it, every time I read a record, it will automatically download the
¤ whole .mdb file once. And every time I save a record, it will automatically
¤ upload the whole .mdb file once. This is a big big problem. So I don't know
¤ how to do.
¤

First, I don't believe it's necessary to map a drive letter to the path, unless it's for
establishing credentials with the remote resource.

Second, the .mdb does not need to be downloaded. You can access it directly over the network from
the client. You need to make certain that you have full permissions to the folder resource.

Paul
~~~~
Microsoft MVP (Visual Basic)
wind - 28 Dec 2005 15:42 GMT
Could you please give me a sample of the connection string? I really dont
know how to set. My server is a Linux server with user name and password.
Thz

"Paul Clement" <UseAdddressAtEndofMessage@swspectrum.com>
???????:0vo2r15tkomb11ipbe15p3ubllqm4dho6j@4ax.com...

> ¤ Thanks all
> ¤
[quoted text clipped - 20 lines]
> ~~~~
> Microsoft MVP (Visual Basic)
Paul Clement - 28 Dec 2005 18:52 GMT
¤ Could you please give me a sample of the connection string? I really dont
¤ know how to set. My server is a Linux server with user name and password.
¤ Thz
¤

I've never tried Linux before but the syntax for network resources is below:

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\Sharename\foldername\filename.mdb;"

And like I mentioned the user that is logged on to the client must have full access to the folder
where the database file is located.

Paul
~~~~
Microsoft MVP (Visual Basic)
wind - 29 Dec 2005 04:33 GMT
My server is a FTP server, is it also ok? Do I need to change to other kind
of server?
And how to write the user name and password in the connection string?

Thank you

"Paul Clement" <UseAdddressAtEndofMessage@swspectrum.com>
???????:min5r1pkma2bgfrq54gcqchumlcpu8dc4p@4ax.com...

> ¤ Could you please give me a sample of the connection string? I really
> dont
[quoted text clipped - 16 lines]
> ~~~~
> Microsoft MVP (Visual Basic)
Paul Clement - 29 Dec 2005 14:34 GMT
¤ My server is a FTP server, is it also ok? Do I need to change to other kind
¤ of server?
¤ And how to write the user name and password in the connection string?
¤

If you're accessing via FTP or HTTP that's a completely different issue. Do you have direct access
to this resource through the network or do you have to work through FTP or HTTP?

Paul
~~~~
Microsoft MVP (Visual Basic)
wind - 29 Dec 2005 15:55 GMT
what is mean by "direct access to the resource through network"?

"Paul Clement" <UseAdddressAtEndofMessage@swspectrum.com>
???????:dss7r1hka0ro034phmkhljpjucgda62k7l@4ax.com...

> ¤ My server is a FTP server, is it also ok? Do I need to change to other
> kind
[quoted text clipped - 10 lines]
> ~~~~
> Microsoft MVP (Visual Basic)
Paul Clement - 29 Dec 2005 19:58 GMT
¤ what is mean by "direct access to the resource through network"?
¤

By direct access I mean can you use a conventional connection string using a network resource (like
the example I provided in a previous post):

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\Sharename\foldername\filename.mdb;"

Paul
~~~~
Microsoft MVP (Visual Basic)
wind - 30 Dec 2005 03:42 GMT
Then what kind of server I can use other than FTP and HTTP? coz I dont
familar with server setting. Thz.

"Paul Clement" <UseAdddressAtEndofMessage@swspectrum.com>
???????:kpf8r19ng3csd8jclndtha0emptad181f0@4ax.com...

> ¤ what is mean by "direct access to the resource through network"?
> ¤
[quoted text clipped - 9 lines]
> ~~~~
> Microsoft MVP (Visual Basic)
Paul Clement - 30 Dec 2005 15:29 GMT
¤ Then what kind of server I can use other than FTP and HTTP? coz I dont
¤ familar with server setting. Thz.
¤

A networked file server is about the only configuration that will work for you when using a
Microsoft Access database.

If the file cannot be accessed directly from a networked file server then you would have to build a
web service to run on your FTP or HTTP server which could then be accessed from your client
application.

Other technologies you could try, although they are no longer supported by Microsoft and require a
Windows based server, are RDS and MS Remote. These will allow you to access files over HTTP:

http://www.carlprothman.net/Default.aspx?tabid=93
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdms
crdsprogrammingmodelwithobjects.asp


Paul
~~~~
Microsoft MVP (Visual Basic)
Chander Tomar - 31 Dec 2005 11:35 GMT
first of all all of u tell me any way u have to share that folder
containing the access file then where is the security i mean  every user
can change the data by accessing that file. so its waste please comment
on that.
tomar
wind - 01 Jan 2006 17:07 GMT
yes, i also want to know too. thz

"Chander Tomar" <chandertomar@gmail.com>
???????:%23sqNH5fDGHA.2300@TK2MSFTNGP15.phx.gbl...

> first of all all of u tell me any way u have to share that folder
> containing the access file then where is the security i mean  every user
[quoted text clipped - 3 lines]
>
> *** Sent via Developersdex http://www.developersdex.com ***
Paul Clement - 03 Jan 2006 15:09 GMT
¤
¤ first of all all of u tell me any way u have to share that folder
¤ containing the access file then where is the security i mean  every user
¤ can change the data by accessing that file. so its waste please comment
¤ on that.
¤ tomar
¤

If you are concerned about security then an Access database is a very poor choice. Unfortunately
there is no alternative. You must provide full access to the resource when working with this type of
database.

If you want better (and more flexible) security then use a server-based database system.

Paul
~~~~
Microsoft MVP (Visual Basic)
wind - 04 Jan 2006 14:16 GMT
could you please tell me what is a "networked file server" ? and how to
setup?
thz

"Paul Clement" <UseAdddressAtEndofMessage@swspectrum.com>
???????:qh4lr19n8dbrd36bb6jrnjrd527lou4j86@4ax.com...

> ¤
> ¤ first of all all of u tell me any way u have to share that folder
[quoted text clipped - 16 lines]
> ~~~~
> Microsoft MVP (Visual Basic)
Paul Clement - 04 Jan 2006 14:39 GMT
¤ could you please tell me what is a "networked file server" ? and how to
¤ setup?
¤ thz
¤

It's just machine connected to your network (domain or workgroup) that shares its file resources. It
could be a dedicated file server or simply a user's computer on the network.

Paul
~~~~
Microsoft MVP (Visual Basic)
yekerui - 05 Jan 2006 18:29 GMT
Hi, there is a free software named as remote database service available at
www.udaparts.com. See the article entitled as
Fast and securely access any database anywhere using all forms of networks
at http://www.udaparts.com/document/articles/dialupdb.htm. Wish this is
helpful to you.

Yuancai (Charlie) Ye

> Hello
>
[quoted text clipped - 3 lines]
>
> Thank you

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.