Solved

sql connection string in ASP for dreamweaver

Posted on 2010-11-18
5
364 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

777 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