PHP完全中文操作手冊

天地JPLOP | PHP首頁 | 函數索引
函數:odbc_connect()

odbc_connect

鏈接至 ODBC 數據庫。

語法: int odbc_connect(string dsn, string user, string password, int [cursor_type]);

返回值: 整數

函數種類: 數據庫功能

內容說明

本函數用來鏈接到 ODBC 數據庫,返回值為鏈接的代號 ID 值。參數 dsn 為資料來源名稱 (Data Sources Name)。參數 user 及 password 分別為鏈接的帳號及密碼。參數 cursor_type 通常省略,其值有 SQL_CUR_USE_IF_NEEDED、SQL_CUR_USE_ODBC、SQL_CUR_USE_DRIVER 及 SQL_CUR_DEFAULT 等四種。當使用復雜的資料存取時可能會有類似 "Cannot open a cursor on a stored procedure that has anything other than a single select statement in it" 的錯誤信息字符串,此時若將參數 cursor_type 的值設為 SQL_CUR_USE_ODBC 就可以避開了。

參考

odbc_pconnect()



整理: 夕垌菪姬 (天地JPLOP)

[ 上一頁 回主目錄 下一頁 ]
版權所有,天地JPLOP、爵堤亞(夕垌菪姬)。網頁背景音樂和各鍊結標題
及鍊結內容和文章小說,版面編排皆歸原權利人所有對本版面
有任何意見或指教,歡迎至論壇指教。