473,505 Members | 13,696 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

First time using ASP to connect to remote MySQL database

25 New Member
Hi, I'm a PHP developer and i've been asked to do some development for a site which is on a web server which only supports ASP. I had planned to have a bash at writing an ASP program (first time) on this server which will interact with a MySQL database on another web server (my company's web space). Would this be possible?
Sep 20 '07 #1
2 4583
JamieHowarth0
533 Recognized Expert Contributor
Hi Nicky,

ASP is definitely interoperable with MySQL - check out my website at www.cmdev-associates.com, uses MySQL 5 Community Edition with ASP and AJAX!

You need the ODBC connector from MySQL (version 3.51 is the latest, from http://dev.mysql.com/downloads/connector/odbc/3.51.html) and get it installed on the server where your ASP pages reside

You then need the following code:

Expand|Select|Wrap|Line Numbers
  1. Set objDbConn = Server.CreateObject("ADODB.Connection")
  2. strConn = "Driver={MySQL 3.51 ODBC Driver};Server=yourmysqlserveraddress.com;Database=yourDB;"
  3. objDbConn.CursorLocation = adUseClient
  4. objDbConn.Open strConn
  5.  
Simple as that!

All the best,

medicineworker
Sep 21 '07 #2
mylo1968
8 New Member
Here:

http://www.devarticles.com/c/a/MySQL/Two-Lessons-in-ASP-and-MySQL/

... is something to be taken into account with ASP/Vbscript and MySQL concerning date data type differences,

Regards,

Matti


Hi, I'm a PHP developer and i've been asked to do some development for a site which is on a web server which only supports ASP. I had planned to have a bash at writing an ASP program (first time) on this server which will interact with a MySQL database on another web server (my company's web space). Would this be possible?
Sep 25 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

16
2867
by: John | last post by:
Hello. If I want to set up my first database and start using it in Dreamweaver what do I need to do? The book I'm working on has a CD with the database on. It is telling me to put it in the...
0
2437
by: Campbell's List | last post by:
Hi, I'm completely new to MySql and need help importing tables from Access or Dbase. I am using Dreamweaver MX to create a data-driven web site. With the VPS hosting plan we're on, our remote...
2
1674
by: Daven Thrice | last post by:
Hi, I've converted the tables from an old Access application to MySql format. I then linked the tables into access using MyODBC and everything works great (on my computer). For now, I want to...
4
6433
by: banz | last post by:
Hello I have a problem to resolve: I wrote a Perlscript which caches data from a server (local on my machine) I would like to have a other connection to a remote server but I don't know how to...
5
3830
by: Ike | last post by:
Through Java, I am attempting to connect to a MySQL 4.12 server on a remote computer. I can connect fine via php. I cann connect fine via Java, through a servlet, when the servlet is on the same...
4
2658
by: courtney.machi | last post by:
Hello, I am trying to connect to a remote mysql server through php. Here's the code: mysql_connect("my.hostname.edu", "username", "password") or die (mysql_error());...
3
10411
by: shawzozo | last post by:
obviously I am doing something wrong when I try to connect to my db. Please help the code I am using is something like this: <?php function connect_db() { global $link; $host =...
2
22525
by: Martin | last post by:
Hi all. I have a fully functional page hosted on my PC that uses PHP and connects to MySQL on my PC to generate it's code. I now have some web hosting available which includes both PHP and...
5
7674
by: msch-prv | last post by:
Hi, I am trying to tie a SQLDataSource control to MySQL without success. The connection string works ok with an ObjectDataSource. (Native asp.net 2.0 MySQL dll loaded in /bin) For some reason,...
0
7213
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7298
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4698
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.