Keyline IT Solutions PVT Limited
Please Login or Register

Knowledgebase

Connect to a mysql database using a dsn-less connection via asp

"<%
dim adoConn
dim adoRS
set adoConn = Server.CreateObject("ADODB.connection")
set adoRS = Server.CreateObject("ADODB.Recordset")
adoConn.Open "Driver={mysql}; Server=192.168.0.1; Port=3306; Option=0; Socket=; Stmt=; database=dbname; Uid=user; Pwd=password;"
adoRS.Activeconnection = adoConn
if adoConn.errors.count = 0 then
adoRS.Open "select * from dbtable"
end if
adoRS.Close
adoConn.Close
Set adoRS = nothing
Set adoConn = nothing
%>"
 
Note *Server= Enter your MySql server Ip

 



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article


Powered by WHMCompleteSolution

Language:

Quick Navigation

Client Login

Email

Password

Remember Me

Search