1. use system dsn
Dim adoConn
Set adoconn = Server.CreateObject("ADODB.Connection")
adoConn.Open "DSN=TextODBC;Uid=UserID;Pwd=Password;"
If adoConn.errors.count = 0 then
Response.Write "Connected Successfully!!"
Else
Response.Write "Connection fail!!"
End if
adoConn.close
Set adoConn = nothing
2. use odbc driver
Dim adoConn
Set adoConn = Server.CreateObject("ADODB.Connection")
adoConn.Open "Driver={MySQL ODBC 5.2 driver}; Server=localhost; Database=TestDB;Uid=UserID;Pwd=Password;"
If adoConn.errors.count = 0 then
Response.Write "Connected Successfully!!"
Else
Response.Write "Connection fail!!"
End if
adoConn.close
Set adoConn = nothing
728x90
'Carpe Programming > oracle' 카테고리의 다른 글
[db2] DB2, MySQL (0) | 2013.10.24 |
---|---|
[oracle] 필드명으로 테이블 조회(user table) (0) | 2013.10.15 |
[lock 세션 kill] oracle lock session kill, ora-00054 (0) | 2013.02.20 |
[oracle] 오라클 원격연결이 안될때 Error: ORA-12535 / TNS-12535 (0) | 2013.01.23 |
오라클 소수점 0. 붙이기 (0) | 2012.11.09 |