How to connect ASP with MY SQL

Status
Not open for further replies.

klnce

New Member
Messages
35
Reaction score
0
Points
0
I need some example code which connects, ASP and MY SQL. please post any kind of examples. please specify the driver also.


I want to convert http://klnce.elementfx.com to a dynamic site. plz help me.:lockd:
 

flinx

New Member
Messages
68
Reaction score
0
Points
0
Can't help you, I don't know anything about ASP, but googling with 'asp mysql guide' i get lots of results.
 

Bobswat

New Member
Messages
104
Reaction score
0
Points
0
I got this from an article, it's not my own work but it looks like its what you want.

Driver: MySQL ODBC Driver-MyODBC 3.51

Code:
<%
Dim sConnection, objConn , objRS

sConnection = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=Your_Mysql_DB; UID=mysql_username;PASSWORD=mysql_password; OPTION=3"

Set objConn = Server.CreateObject("ADODB.Connection")

objConn.Open(sConnection)

Set objRS = objConn.Execute("SELECT FirstName, LastName FROM tblUsers")


While Not objRS.EOF
Response.Write objRS.Fields("LastName") & ", " & objRS.Fields("FirstName") & "<br>"
Response.Write & " "
objRS.MoveNext
Wend

objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>

again just some example code I found

website is: http://www.aspdev.org/articles/asp-mysql-connect/
 
Last edited:

klnce

New Member
Messages
35
Reaction score
0
Points
0
is x10hosting.com is capable of running asp pages? Please reply soon.
 

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
as of currently, x10 does NOT offer ASP. Although they do plan on adding it soon. You might want to check with them if they can put ASP on your account, since I know they have put ASP per-basis.
 
Status
Not open for further replies.
Top