 |
| Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

June 11th, 2010, 11:47 AM
|
|
Authorized User
|
|
Join Date: Jun 2010
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
need help
hi. i have built asp based site and uploaded that site along with access database.
now i want to send the online(remote)database data into my local mechine(specific client) what address i ll give with in connection string for local mechine database. or if any one has idea that how it is posible. olz do reply waiting despratily. u can send me reply on [email protected]
__________________
B + & Think +
|
|

June 11th, 2010, 09:07 PM
|
|
Registered User
|
|
Join Date: Jun 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I can help you , but I'd need a bit clearer of an explanation. It sounds like you want your website to connect to your desktop, which is usually not possible or difficult to do. Anyhow, I'm at ClassicASP.com, so contact me there if you would like to discuss it further
|
|

June 14th, 2010, 04:26 PM
|
|
Authorized User
|
|
Join Date: Jun 2010
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
need help
hi. if u have any clue than just povide . how could i give the adress of local database while i am using my online database.i think both are in diffrent aplication domain ,so what should i do
__________________
B + & Think +
|
|

June 14th, 2010, 04:37 PM
|
|
Registered User
|
|
Join Date: Jun 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Its possible if your web server and your desktop are on the same network.
But if you are on a shared hosting plan, or else if your server is hosted elsewhere, you might need a VPN connection between the two machines so that one can see the other.
Also, its important to note that if your desktop is shut down, your website will no longer work.
Usually this is not a good idea. It would be a better idea to setup a VPN connection between your desktop and your server, and then use linked tables in an access database on your desktop machine, while the actual real tables reside on an access databse located on the server.
|
|

June 14th, 2010, 04:56 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
The real question is, IMO, why do you want to do this? There are probably lots of better alternatives available.
Can you explain a bit more about why you want this?
Cheers,
Imar
|
|

June 15th, 2010, 07:26 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
|
|
IMAR: ithink the reason doesn't matter, because it can't really be done.
You can't make a remote connection to an *ACCESS* database.
Access isn't really a true database system. And the driver used to connect to it (whether the "Microsoft.Access" driver or the "JET OLEDB" driver) isn't a database *server*. Instead, the driver is just an ordinary DLL that is loaded as part of the same process space as ADO, which in turn is the same process space as ASP. And to "connect" to an Access database, then, you must pass its *filename*. And that means it must be a file on the *same machine* (or, at a minimum, on the same LAN) as the web server.
Now, could you create your own web service that would act as a proxy for you and pass along commands to a local Access DB and return (possibly as XML?) data? Sure. But that's got to be orders of magnitude more complex than Helicals is ready to handle at this point.
The only practical way to do this is *probably* to simply use FTP to copy the entire ".mdb" file from one place to another.
Last edited by Old Pedant; June 15th, 2010 at 07:30 PM..
|
|

June 15th, 2010, 07:29 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
|
|
Quote:
Originally Posted by classicasp
Its possible if your web server and your desktop are on the same network.
|
Yes. Exactly. Same LAN, more explicitly.
Even on a LAN, it's not necessarily easy, as the machine with the DB must give permissions to the IIS user on the other machine or it can't access the file.
Quote:
|
But if you are on a shared hosting plan, or else if your server is hosted elsewhere, you might need a VPN connection between the two machines so that one can see the other.
|
Now here you have lost me. I can't see how a VPN connection helps. The remote ".mdb" file is still not going to be accessible *as a file* from the ADO connection. Unless you know a VPN trick I don't.
Last edited by Old Pedant; June 15th, 2010 at 07:31 PM..
|
|

June 16th, 2010, 03:11 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Code:
IMAR: ithink the reason doesn't matter, because it can't really be done.
Hence the "There are probably lots of better alternatives available."
This is about sharing data somehow. The OP may have chosen an Access db on a local work station but that's just one (non)solution. I am sure that for the underlying issue, other solutions exist.
Cheers
Imar
|
|

June 16th, 2010, 04:44 AM
|
|
Authorized User
|
|
Join Date: Jun 2010
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
actual problom
hi, basicaly i want to control my pc or give instructions to from any where or to get localmechines data (any format) on remote server using asp code . so for that purpose i ve built a (test)site and uploaded that site. now i want to built an asp page for special client mechine which could get data from access database which is uploaded and store that data on the local mechine's database .but the uploaded site is in diffrent domain , and tried to access the remote databse from local domain by giving the proper connectionstring but it is not working , i think due to diffrent domains.
so if there is any way to get remote data in my local mechine database. if u people have any idea or clue to do that then plz do share to me.i ll be thankful
__________________
B + & Think +
|
|

June 16th, 2010, 04:05 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
|
|
Well, Imar is surely correct that "There are probably lots of better alternatives available".
If you would use MySQL or SQL Server, then indeed you *could* make remote database connections (if you enable that capability in your installation). As I said, Access simply is *not* a database server.
If you insist on using Access, then the best you can do is probably create a "web service", also as I noted. You would write an ASP page that would accept a request (could even be simply a SQL query, though I would suggest also requiring a username and password), make a query on the Access DB, and return the results in some format of your choosing. One easy format would be a tab-delimited text file. Not the most efficient, but it would work.
So your ASP "web service" page might look like:
Code:
<%
name = Trim(Request("name"))
pwd = Trim(Request("password"))
If name <> "ZY11abc" AND pwd <> "whizbang" Then Response.End
sql = Trim(Request("SQL"))
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "...your connection string..."
Set rs = conn.Execute(sql)
Response.Write rs.getString( )
rs.Close
conn.Close
Response.End
%>
(That's for SELECT queries, only...you'd want something a bit different for INSERT/UPDATE/DELETE queries.)
It's hacky. It means that the ASP code on the "caller" system has to then parse that text string to get its data, but it would work.
|
|
The Following User Says Thank You to Old Pedant For This Useful Post:
|
|
|
 |