[英]MySQL JDBC driver connection string?
如何使用JDBC驅動程序連接到MySQL數據庫? 使用Percobol軟件,用於Cobol。
DO-CONNECT.
STRING "jdbc:mysql://gpiw.be/db;"
DELIMITED BY SIZE
"user=user_db;"
DELIMITED BY SIZE
"password=*********"
DELIMITED BY SIZE
INTO JdbcString
EXEC SQL
CONNECT
TO :JdbcString
DRIVER "com.mysql.jdbc.Driver"
END-EXEC
.
怎么了?
資料來源: http : //dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html http://www.easysoft.com/developer/interfaces/odbc/sqlstate_status_return_codes.html #28000
找到了解決方案:
DO-CONNECT.
STRING "jdbc:mysql://***ip****/***database**?"
DELIMITED BY SIZE
"user=****username****&"
DELIMITED BY SIZE
"password=****password******"
DELIMITED BY SIZE
INTO JdbcString
EXEC SQL
CONNECT
TO :JdbcString
DRIVER "com.mysql.jdbc.Driver"
END-EXEC
.
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.