|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Connectecting to a DB on an external server
hello, I wanted to know if it is possible to connect to a DB that is not located okn my server.
I want to build a VB program that will connect to a DB (using DAO) on an Internet Server, Is it possible? will I have to use the winsock.dll? any Ideas will be helpful, thanks, Ben. |
|
#2
|
||||
|
||||
|
Either the machine that the application is going to be run on has to support (in odbc) a connection to the database or you will have to supply a driver so that you can connect.
It is easiest done via odbc to set up a dsn to the database (which typically isn't on your machine) which also makes connecting a lot easier. Also, I would recommend ADO instead of DAO since it is better maintained then the older DAO methods. |
|
#3
|
|||
|
|||
|
I only said DAO cause I thaught VB suports only DAO and not ADO, but I too prefer ADO...
about the connection to the DB, I realy didn't understand you, maybe U didn't understood me, I'll explain again: I want to make a VB program on my computer (or any other computer) that I'll run and it will be able to connect to my DB that's on a web server (example: http:\\www.bla.org.il\db\db1.mdb OR Ip:192.168.0.1\db\db1.mdb(not this IP, but an IP)). I want to be able to change that DB and also read from it, I have the FTP username and password, now, how do I do it? If you could me a little bit specifeic, thanks, Ben. |
|
#4
|
||||
|
||||
|
ok, let me try to explain this a little better.
A typical database is not on the computer that the accessing application is run from. That is one of the reasons odbc is there. ODBC allows you to set up an ip/port/db driver combination in many instances to connect to the database. Now, in your case, your dealing with an access file through ftp. This doesn't really fit into the above scenario, and although I can think of a solution for your problem, it isn't a good one: the application downloads the database and uses it on the local machine, then when it is done, it ftps the altered version back to the server. This isn't a good scenario because if more than one application will use this .mdb file, then your data has severe possibilties for bad data, or incorrect data to be used, or for data to be lost, etc... |
|
#5
|
|||
|
|||
|
The only way I know to connect to a remotely hosted access file is with the MSRemote provider. However, it's not readily available from web hosts, I know it's not available on my hosted sites.
http://support.microsoft.com/defaul...&NoWebContent=1 |
|
#6
|
|||
|
|||
|
thanks for the answers, but Onslaught, if you say ODBC is there to connect to the DB with an IP then whats the problem? Can't I use it?
Or is it available in ODBC only with the MSRemote? thanks anyway, and Doug, the MSRemote provider needs to be installed on both the server and the client's computer, or only on the server? thanks, ben. |
|
#7
|
|||
|
|||
|
OK guys, I found a page talking about exactly this, take a look:
http://www.able-consulting.com/MDAC...DriverForAccess In the end of that there is a prase: If MDB is located on a remote machine - Or use an XML Web Service via SOAP Toolkit or ASP.NET - Or upgrade to SQL Server and use an IP connection string - Or use an ADO URL with a remote ASP web page - Or use a MS Remote or RDS connection string now, I wanted to ask, how can I know if MS remote or RDS is installed on my server? |
|
#8
|
|||
|
|||
|
Quote:
Ask the server admin. If it's a commercial ISP I think your odds are not good of finding the MS Remote provider available ![]() If I had to use a remote Access DB I'd probably throw together some asp-based wrapper to communicate with the remote db rather than trying to get to it directly. |
|
#9
|
|||
|
|||
|
I think it is a best way that use web access DB.Like asp access sql or MS access,PHP access MYsql...
|
|
#10
|
|||
|
|||
|
by web access DB, you meen direct access, and not remote, or what?
and "asp-based wrapper" do U meen ADO URL? - http://www.able-consulting.com/MDAC...doUrlConnection |
|
#11
|
|||
|
|||
|
I mean the URL is the web url like asp page,not the ADO url..U can use asp to access DB directly.
|
|
#12
|
|||
|
|||
|
I know I can connect to the DB through a asp page thats on my server, and I allready do that, but I also want to make a program that will access the DB remotly...
|
|
#13
|
|||
|
|||
|
Yeah, I want to do something to do like that too, I have a DB on a server, and those data is imported into Excel via VBA. So now I want to export specific parts of those excel files so I can view them in VB or so... you know how to do this?
Good luck to us all ![]() ? |
|
#14
|
|||
|
|||
|
Maybe it's helpful to u
http://www-level3.experts-exchange....Q_20681145.html |
|
#15
|
|||
|
|||
|
I`ve made it myself easy,
I`ve given the regions i want to partionally export a name, then recorded the exporting with one region, and then adjusting it, and copying it for the other regions... this solves my problem. If you still have some, post! greetz... |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Connectecting to a DB on an external server |