PDA

View Full Version : how do i connect dreamweaver to my database?


rumbuls13
02-27-2006, 11:52 PM
i think my problem is very simple but i think im missing something very basic.
i just started my own website. my host is godaddy and i have the economy package if you know them they give you 10 free databases to set up through MySQL. i also set up a dsn. i am trying to connect to my databases through dreamweaver.
i am creating my pages through dreamweaver using asp. if you know dreamweaver they have an applications tab and then you click on databases and then from there you can create a custom connection string or a DSN. which one should i choose? ive tried doing it both ways and ive gotten no results. it wont make any connection to my databases.
my databases are located in https://mysqladmin.secureserver.net
how do i retrieve them when they arent located on my localhost. ive read endless tutorials on how to retrieve them on your own computer but im trying to get them through a site. also ive already gone to connectionstrings.com and applied some of those strings, nothing seems to work. which one should i use anyway?
we are successful in connecting using a hand-coded script.

thanks in advance for any help.

Creative Insanity
02-28-2006, 12:09 AM
Watch this (http://www.webthings.org/vtm/dwc/aid/) it may help.

rumbuls13
02-28-2006, 12:24 AM
thank you for your link. however, it is way beyond what im trying to do.
my problem just has to do with the connection string to the database. my database was provided by my web host so it isnt saved on my computer. i have to log in through my host. how do i retrieve information from data not located through my localhost? using ASP?

rumbuls13
02-28-2006, 12:28 AM
also, whenever i try to enter my dsn it comes up with an error saying

[microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.

what does this mean? and why is it saying it?

Creative Insanity
02-28-2006, 12:39 AM
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_dwc = "localhost";
$database_dwc = "database";
$username_dwc = "user";
$password_dwc = "password";
$dwc = mysql_pconnect($hostname_dwc, $username_dwc, $password_dwc) or trigger_error(mysql_error(),E_USER_ERROR);
?>
Place this in a txt file and name it what every you like as long as the extension is .php. Place it on the server and include that in the files you want to connect to the database. Change between the quotes (do not remove the quotes) with your mysql info.

rumbuls13
02-28-2006, 12:45 AM
i am actually using ASP not PHP code.
also i have already established a connection using ASP script but how to i establish a connection through dreamweaver DSN connection?

ex. "FILEDSN=c:\mydata.dsn;Uid=username;pwd;"

what string do i use when my database isn't located on my computer?

Creative Insanity
02-28-2006, 02:24 AM
ASP! sorry you are on your own then as far as I am concerned. I finished with asp years ago and no setup for that anymore.