Solved

sql connection string in ASP for dreamweaver

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Autosum input type=text when checkbox is true 28 101
Syntax for query to update table 2 29
JQuery Autocomplete Tag AJAX (Need nice script) 11 34
Filktering Alphabetically 8 28
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

792 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