Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. 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 Professional 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
 
Old November 30th, 2005, 06:56 AM
Authorized User
 
Join Date: Nov 2005
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Database connection

Hi folks - just a quick question.

Is it possible to connect to a database that sits on a webserver using a script that sits on a local machine ?

If so, would the connection string look something like this :
sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("http://www.blah.cm/casinonewsxml.mdb")

The reason I ask, is because I have a vbscript that uses windows scheduling service to run at different stages during the day to update a database on a live server. I was wondering if it was possible to put this script on a local machine and make changes to the connection string.

I'm sure there are security issues etc, so any comments or input would be greatly appreciated. Or if you could think of any other ways I could do this, that would really help.

Thanks folks

 
Old December 1st, 2005, 11:41 AM
Authorized User
 
Join Date: Nov 2005
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've decided to use MySQL database instead of the access database - access seems to be too flakey for this type of remote connection.

I have connected to a mysql database and have experienced a bit of a problem. I can insert and display info ok from the database, however when I try and enter in a date it doesn't seem to work. I believe its because mysql stores the dates as 0000/00/00 and asp does it the other way, 00/00/0000.

Any body know of any scripts or resources that might help me fix this?

Thanks folks.

 
Old December 1st, 2005, 12:45 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am a bit rusty on my MySQL knowledge but check to see it the GRANT tables in the MySQL database for the user you are using allows you to modify the database, tables etc. MySQL has a pretty fine-grained solution for managing the access (read/write). It took me a while to come to terms with the method.

If this is not the problem you can just convert the date representation you have got to the one which the database accepts. This should be simple string manipulation so it shouldn't cause problems.

Hope it helps a little,
Jacob.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Connection to Access Database reachsevar ASP.NET 2.0 Basics 1 November 28th, 2007 08:56 AM
Database Connection oneillg PHP Databases 1 October 17th, 2007 04:48 PM
Database Connection kapi.goel SQL Language 2 February 14th, 2006 07:01 PM
database connection Nitin_sharma Classic ASP Databases 1 February 8th, 2005 10:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.