728x90

sqlca.DBMS = "ODBC"
sqlca.DBParm = "ConnectString = 'DRIVER={MySQL ODBC 3.51 Driver};" + &
"SERVER=" + t_id + ";DATABASE=db;USER=root;PASGYORD=;OPTION=20490;'" + &
",DisableBind=1,StaticBind=0"
//SQLCA.DBParm = "ConnectString='DSN=tosmysql;UID=root;PWD='"
sqlca.AutoCommit = False
if g_connectmysql = 0 then
connect using sqlca;

ls_query = "SET SESSION CHARACTER_SET_CONNECTION=euckr"
EXECUTE IMMEDIATE :ls_query USING sqlca;
ls_query = "SET SESSION CHARACTER_SET_CLIENT=euckr"
EXECUTE IMMEDIATE :ls_query USING sqlca;
ls_query = "SET SESSION CHARACTER_SET_RESULTS=euckr"
EXECUTE IMMEDIATE :ls_query USING sqlca;
ls_query = "USE db"
EXECUTE IMMEDIATE :ls_query USING sqlca;

if sqlca.sqlcode <> 0 then
MessageBox ("DB 접속오류", sqlca.sqlerrtext)
return
end if
end if

728x90

+ Recent posts