ACCESS over TCP/IP

  • Thread starter Thread starter Nuno Fonseca
  • Start date Start date
N

Nuno Fonseca

Anyone knows if it is possible to make a database connection over TCP/IP to
an MS ACCESS database? If yes please give me an example or any documentation
please.

Best regards,

Nuno
 
Nuno Fonseca said:
Anyone knows if it is possible to make a database connection
over TCP/IP to an MS ACCESS database? If yes please give me
an example or any documentation please.

MS Access is a desktop database management system. Access and the Jet
drivers do not support to use a port in the network. If you want to access
the database over the intranet or internet, you should use an other database
management system like MS SQL Server or MySQL.
 
Umm, I would say "No". Access is a file based database and does not have
any service or program running at the site of the database, whereas other
programs, such as SQL Server and Oracle do.

You *could* approach it in two ways:
1. Create a program that runs on the Access machine, listens for TCP
connections, accepts queries and returns recordsets or status flags in raw
binary or XML code. This, I suppose can also be accomplished using SOAP or
Remoting.
or
2. Use IIS to simplify it and just create 'post' pages that accept SQL
commands and return recordset in XML, then parse them in your own program.
 
Nuno,

Those who tell you that you can not do this have not fully explored the
alternatives, or they simply have not used Jet 4.0 this way. I have three
applications that use Access databases this way. One of them uses wireless
PDA devices to access Jet files. For small applications this is fine. You
have to make sure, though that you are not passing a great deal of data over
the network or it will be slow.
Using an IP address instead of a DNS name such as "\\MyNetComputer\MyData\"
is actually faster because the DNS name does not need to be resolved. There
are several things you can do.
1. If you have access to the data at the IP address you can use it in your
connection object just as if you had used the DNS name.
2. You can create a VPN tunnel to the data using the IP address if your
operating systems on both ends support them.
3. You can create a Network Place on your system using the IP address.

Assuming you are not trying to pass large datasets over the Internet it
doesn't matter where you are.
 
Herfried,
MS Access is a desktop database management system. Access and the Jet
drivers do not support to use a port in the network. If you want to access
the database over the intranet or internet, you should use an other database
management system like MS SQL Server or MySQL.
I think the wrong word is access the database, Everybode can access a
textfile over the Internet or a network.
I think you did you mean something as direct access (connection) to the
database?
Just one wrong word in English.
But people love to correct you, be proud.
:-)
Cor
 
Herfried,

Sorry you are incorrect. I do this everyday. If the client has large
datasets I put him on SQL 2000. IP addresses work to access ANYTHING just
as if I use a DNS name.

Regards
 
Nuno,

One thing to watch out for is the security system in Access. When I use
Access over the Internet I require the user to drop all Access security and
use Windows security to establish who can read/write the file. Access
security can get in the way when establishing connections.
 
Cor said:
I think the wrong word is access the database, Everybode
can access a textfile over the Internet or a network.
I think you did you mean something as direct access
(connection) to the database?

Yes. That's what I wanted to write.
Just one wrong word in English.
But people love to correct you, be proud.

;-)
 
Jerry said:
Jet 4.0 connection objects support the use of IP address.

Thanks for the information. I am not really familiar with databases
(especially Access databases), but I read what I wrote somewhere some time
ago...
 
Jerry said:
Herfried,

Sorry you are incorrect. I do this everyday. If the client has
large datasets I put him on SQL 2000. IP addresses work to access
ANYTHING just as if I use a DNS name.


I don't think you are *directly* accessing the database over TCP/IP. On
which port should I or the Jet Engine connect? What's the protocol? What's
listening on the server for the client's requests?
 
Jet 4.0 connection objects support the use of IP address.
I don't have a public server available right now to show you that you can
Read/Write whatever to a Jet database from anywhere over the Internet, but
if I have time to get my 2003 server installed I will be glad to send you a
VB.NET exe which will connect to it. Give me a few weeks. I used this method
in the infancy stages of a large project for a large corporation so that
they could continue development while waiting for their SQL server.

Regards

Regards
 
Correction the next was ununderstandable.
..
Jet 4.0 connection objects support the use of IP address.
I don't have a public server available right now to show you that you can
Read/Write whatever to a Jet database from anywhere over the Internet, but
if I have time to get my 2003 server installed I will be glad to send you a
VB.NET exe which will connect to it. Give me a few weeks. I used this method
in the infancy stages of a large project for a large corporation so that
they could continue development while waiting for their SQL server.
OleDB?
 
;-)

Herfried K. Wagner said:
Thanks for the information. I am not really familiar with databases
(especially Access databases), but I read what I wrote somewhere some time
ago...
 
Armin,

..NET takes care of all that. The key difference between using SQL 2000 or
Oracle as opposed to Jet is what it does to the SERVER, not how it looks to
the client. By the time data gets to the client it is XML and he doesn't
care what served it to him. If you are serving a large database you should
use a Data server which optomizes things on the server. Jet does little to
help the server run well.
MS Access (I think 95 and above) actually has tools for establishing
connections over the Internet within itself. If you have a copy check it
out. You can establish the connection by IP or by path name.

Regards
 
Jerry,
Before you think that I see no problems accessing MS-Access over Internet, I
think that is widely spread used and gives in my opinion with low access no
problems.
The only thing I don't see, how to access a MS-Access database on a server
(without IIS) in Amsterdam, while the IIS (Asp.net) server that access it
(connected to it) is in NewYork.
Cor
 
The thing is Cor that you have to access the disk that the .mdb file is on.
Once you have that you just open the file as normal.

It's the accessing of the disk that can be problematic because it needs to
use the netbios related ports on the target server which are unlikely to be
open and exposed to the internet, as a matter of course, at the target site.

If you recall, these were the ports that allowed that recent nasty to do
it's stuff.

But, the point is, if you can connect to the share containing the file, then
you can open the .mdb.
 
Stephany,
That I know, in that way I can reach every other file.
But what I mean in saying it in other words is that when you connect to an
SQL server in your IDE you do not have to give a share, it is a Server over
IP I think (there stops my knowledge at the moment).
It is an extra benefit, but one that I don't believe that I ever shall use.
But it is an extra benefit.
But it is becoming a theoretical discussion just because Herfried
misunderstood the question.
And I am not good in that I am very pragmatic.
I only came in to try to make things clear between connection and access.

But thanks for your post.
I apriciate it.

Cor
 
Back
Top