Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MySQL and FrontPage?

Status
Not open for further replies.

NinelG

Programmer
Feb 14, 2003
9
US

I am absolutely new to MySQL and PHP so please bare with me.

My website is written in asp on FrontPage. I want to include a database, but the only database that I can use with my web hosting company is MySQL. Is it at all possible to use asp as front end and the MySQL as backend?

 
You most certainly can use ASP to access MySQL. I don't know what type of priveleges you have, but if you can setup a DSN to your MySQL database, it'll be a little easier to access. You can also access via a DSNless connection. All this is done through the an ADODB connection using the appropriate connection string to establish the connection. There are some previous posts about connection strings here. Here's some example code that I copied from a previous post.

Code:
CONST adConnectionString = "driver={MySQL};server=localhost;uid=MyID;pwd=MyPassword;database=MyDatabase"
dim conGlobal 'this is the connection object for all recordsets
dim rsExample 'this is one of many recordsets...
dim SQLStatement

set conGlobal=server.createobject("ADODB.Connection")
set rsGlobal=server.createobject("ADODB.Recordset")
conGlobal.open adConnectionString
SQLStatenent = "select fields from table;" 'for instance...
rsExample.open SQL, conGlobal, adOpenForwardOnly 'or whatever cursor type you want...

Hope this gives you an idea where to go.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top