How can I connect database?

India
August 15, 2009 11:14pm CST
Hello guys! Now a days I am working on my college project.It is a website that is based on ajax. I am using Microsoft visual web developer 2008.I am using asp.net and my database is in .sql format but this format is not supported in visual web developer. Can you help me out? how can i connect that database in my site through visual web developer? Please give me brief process and description. Enjoy myloting
1 response
• India
19 Aug 09
Hi friend, Have you try to do googling for that. I am a new bie in that field so I would not know that, but after looking one of my book, I found that Creating a Database Connection The following line of code simply constructs an XML file with strings and writes them to the page via PHP: header("Content-Type: application/xml; charset=UTF-8"); Interacting with the Database DEFINE (’DB_USER’, ’USERNAME’); DEFINE (’DB_PASSWORD’, ’PASSWORD’); DEFINE (’DB_HOST’, ’localhost’); DEFINE (’DB_NAME’, ’DATABASE’); $dbc = @mysql_connect (DB_HOST, DB_USER,DB_PASSWORD) OR die (’Could not connect to MySQL: ’ . mysql_error() ); Source for last part: http://www.peachpit.com/articles/article.aspx?p=431716&seqNum=3
1 person likes this