Exemplu de conexiune ASP + MySQL 5

ASP.NET

Dim sConnection, objConn , objRS

sConnection = "Driver={MySQL ODBC 5.1 Driver}; Server=89.38.209.15;
charset=UTF8; DATABASE=baza; UID=user;PASSWORD=pass; OPTION=3"
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open(sConnection)
Set objRS = objConn.Execute("Select * From tabel where cod='cod';")

While Not objRS.EOF
Response.Write objRS.Fields("textul")
objRS.MoveNext
Wend

objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing

Add Feedback