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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can Win program connect to access DB over Internet??

Status
Not open for further replies.

davemassey

Programmer
May 10, 2004
19
US
Hi all!

I have an application which, currently, connects to an access database on the users local machine in a read-only manner (ie, users are not allowed to update the database). Due to the database size, I'd like to move the database to our web site and allow our windows applications (written in Visual C++) to access the data over the internet and send the information back to the customer PCs. Is this possible using access?? or do I need to persue a different avenue to make the program "distributed"?

Thanks in advance..

Dave
 
Dear davemassey,

Yes, I just did the exact same thing myself today for a client.

Using VBScript, in a html page, I accessed a local access mdb that was then pointed to data on the server thru ODBC.

To connect over the internet, you need the proper connection string.

Here is a link to a site that has samples of many connection strings:

Note: If you are running C++, you will need MS Access installed on the local PC's. If access is not installed locally, then you need MDAC drivers, version 2.8 and MS Jet Driver 4.0 to make the whole thing work.

Note: I worry about your performance. Is it a local intranet or remote over the internet. You might need to step up to MS SQL server if performance becomes an issue.

Hope This Helps,
Hap [2thumbsup]


Access Developer [pc] Access based Add-on Solutions
Access Consultants forum
 
Hap,

Thanks for the info - it looks like that will do the trick!

-Dave
 
Hap,

I'm trying to replace the following local Access database connection code (in MSVC++) with one from the link you provided but have not figured out which one is the correct one.
----

CDatabase m_Database;
CString strConnect;

strConnect.Format("ODBC;Provider=MSDASQL.1; DataSource=Sample_DB;"
"Connect Timeout=15;Extended Properties='"
"UID=Dave;PWD=Login;DSN=Sample_DB;"
"DBQ=Users.mdb;DriverId=281;FIL=MS Access;"
"MaxBufferSize=2048;PageTimeout=5;';Locale Identifier=1033" );

if (!m_Database.Open(NULL, FALSE, TRUE, strConnect))
{
AfxMessageBox( "Could not connect!", MB_OK );
return false;
}

----

Again, I'm trying to connect to an Access database which resides on a web site. So I'd have a url like:
Any help would be greatly appreciated!

Thanks again.

-Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top