Solved

sql connection string in ASP for dreamweaver

Posted on 2010-11-18
5
356 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
Comment Utility
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 82

Expert Comment

by:Dave Baldwin
Comment Utility
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
Comment Utility
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
Comment Utility
Does MySQL have a driver for ASP?
0
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Adobe Acrobat Pro top display text upside down? 5 82
CSS Question.. 3 72
XML Parsing Classic ASP 5 42
Summernote required 3 56
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…
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now