Solved

sql connection string in ASP for dreamweaver

Posted on 2010-11-18
5
366 Views
Last Modified: 2012-05-10
I'm trying to connect to my sql database in dreamweaver. If i set up the connection the sql server in php, i get a perfect connection and all my table information shows up in dreamweaver
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_blog2 = "localhost";
$database_blog2 = "**";
$username_blog2 = "**";
$password_blog2 = "***";
$blog2 = mysql_pconnect($hostname_blog2, $username_blog2, $password_blog2) or trigger_error(mysql_error(),E_USER_ERROR);
?>
My real pages are set up in asp and I'm trying to convert that Connection file to ASP but I keep getting an error using a string like 'data source not found or driver not specific'

MM_blogConn_STRING = "Driver={SQLServer};Server=locahost;Database=wpoorah;Uid=***;Pwd=***;"

what can I do to get an ASP string?
0
Comment
Question by:rivkamak
5 Comments
 
LVL 18

Expert Comment

by:Jerry Miller
ID: 34170305
Is it a SQL db or MySQL? You are using SQL drivers if it is a MySQL db.

Try it with Provider=MySQLProv

http://www.webcheatsheet.com/ASP/mysql_connection_strings.php
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 34170693
Here http://www.connectionstrings.com/mysql is a list of connection strings including some that work with ASP.  But some require drivers like the "MySQL Connector/ODBC 5.1".  There is no 'native' driver for MySQL built in to ASP.  MySQL provides the driver that is included in PHP.
0
 
LVL 29

Expert Comment

by:Badotz
ID: 34170972
This has helped me with connection strings in the past:

 1. In Notepad, or any other text editor, create a file named Temp.udl  

 2. Leave the file empty and save it to the Desktop

 3. Double-click the Temp.udl file

 4. The Data Link Properties dialog box appears

 5. In the Data Link Properties dialog box, click Provider. Select the appropriate provider from the list

 6. Click Connection and select the corresponding name of the server and the database
    Type the User Name and the Password
 
 7. Click Test Connection to test the connection

 8. Click OK

 9. Right-click Temp.udl and click 'Open With'
   
    If Notepad shows up as an option, click it, otherwise click 'Choose Program' and navigate
    through the list to notepad and select it

10. Copy the connection string to your application

0
 

Author Comment

by:rivkamak
ID: 34173552
Does MySQL have a driver for ASP?
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 34175253
On this page http://www.mysql.com/downloads/connector/odbc/ is the most current ODBC driver that will work with ASP.  Note that this has to be installed on the server that is running the ASP interpreter and web site.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question