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
'PowerBuilder' 카테고리의 다른 글
COMPOSITE 데이터윈도우에서 빈 페이지 출력될 때 (0) | 2012.07.29 |
---|---|
this is necessary for the initial connection to oracle to grant privileges on the repository (0) | 2012.07.29 |
파워빌더 데이터윈도우 특정 셀 색깔 바꾸기 (0) | 2012.07.29 |
파워빌더 help, contents, 도움말 안될 때 (0) | 2012.07.29 |
Column 2 has an invalid name and/or length 해결방법 (0) | 2012.07.29 |