Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to an Access DB on the Web

Status
Not open for further replies.

Trowser

IS-IT--Management
Dec 16, 2002
125
GB
I have put my Access 2k DB up onto the web and informed my ISP who created a DSN on the server to support it.

What I want to know is how now do I connect to that DB over the Web?

Also when they start up the program how do I check that they are connected to the web?

 
I use this connection string with ASP pages.
The ISP or you will have to name it with the Data Source Name (DSN) you provide. The ISP will set up the DSN or they may let you do it through a support menu.
Hope this helps
You can test connection with the state.
if conn= 0 then conn.open ' NOTE 0=open 1= closed

Dan

DIM CONN
Set conn=server.CreateObject("ADODB.Connection")
IF CONN.State=1 THEN CONN.Close
with conn
.ConnectionString="DSN=YourDSNHERE;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;"
.Open
end with
 
ok bit confused so will give a little more info

my ISP set up the DNS and called it ENB_A
my website where it is located is
where do I put that info in?
 
BTW Besides connecting what are you going to do with the data. Do you want to pull it out of the database and into a page?? What end reslt are you looking for??
 
nope not written in ASP

Noting is on the site its just a file depository

I just want to be able to connect to the Access DB more or less the same way as I would if it was on my local machine.

Or am I missing something?
 
program resides on the users machine and the DB on the internet as he uses the program it pulls the infomation from the server on the net
 
My mistake with the ASP. Since you said you had an ISP provide the space and DSN I assumed you were going to have a website out there. When your at you local machine what do you connect to the file with - Access?.
I might be able to help but I am not sure what you trying to do or why. Why do you have the file with an ISP? Can you give me more detilas on what you trying to do?

Dan
 
yeah basically I have a program that uses an Access Database and it pulls all that info and collates it for the user so that they can check details.

Now it works fine here with a local or network DB but now I want to make it availiable to basically anyone and everyone that wants it.

But to do that I want to have the DB reside on the internet.

I want the program to go to the location on the internet of the access DB and use it just like it was on a network machine.

But I seem unable to do that.

Now when I put it up on the server I had to tell my ISP and they created a DSN for it but I can't get the program to connect to the DB on the internet

I want the internet to act like just another network machine so that people at home in the office or anywhere can get their program to access it
 
What kind of "Program" is it a VB application.
The only way I know to do something like that is to embed a web browser into a form and call it through a webpage. HTML wont handle the DSN so I would do it in an ASP page (or JAVA, cold fsion etc...)
I never herd of doing it any other way. If there is another way to do It I never herd of it.
 
Since the ISP has the database and there is no copper wire
to connect to it its going to have to be manipulated over the internet which requires hitting a URL address with a web page. The only way I know to do that in the confines of a VB app is to embed a browser page inside the/an applications form. Thats if you want to use the VB app.
I know of no other way to do it. I can ask around the office tomorrow for ya. I've been at this a long time and never herd of a desk top app hitting an ISP database without using web pages.
 
Thanks Dash that would be great I can get my ISP to put it on an SQL server which then should work fine but dont really wanna spend the cash on that if I can avoid it
 
Ok I'll ckeck in the morning for ya. Putting it on SQL server won't change a thing. Youd still have to connect to it over the net. I'll let you know tomorrow.

Dan
 
hmm set up an SQL server on someones machine in Florida and was able to connect over the web to that, just canna do the same thing with access
 
Trowser,

I've checked with my fello IT'ers here and the concensous is: SQL server/Oracle can do as you say (I stand updated/corrected)as they can handle their own connections through TCP/IP. The AccessDB cannot. You would have to use the DSN provided to make the connection through HTTP as you dont have a TCP/IP connection which SQL server can handle.
Again the only way to do it without downloading or FTP'in is through the HTPP via a web page. You could embed the page in a VB form and parse all the data you want.
I hope some of this helped.

Dan
 
Thanks Dashley

Your conformation was very useful at least know I know for sure, now I have to decided what I am going to do, spend cash on SQL or find someone that can open the DB using ASP or something.

Never tried any web lang myself

Dan
 
Dan

The ASP is easy. Its in VBscript which is very siimular to VB n any ways. You use basically the same connection strings and Record sets you'd use in a vb app. Its not that hard.

Good luck


Dan
 
If you want to try the embeded browser in a form
the call to the page is like this
DIM WEBURL AS STRING

WEBURL = "
With WebBrowser1
.ToolBar = True 'optional
.AddressBar = True 'optional
.Navigate WEBURL ' This activates the HTTP call
End With

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top