全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:1268
推到 Plurk!
推到 Facebook!

如何使用ADOConnection連結Oracle時可以指定連結資料庫

尚未結案
zoojack
一般會員


發表:2
回覆:1
積分:0
註冊:2006-12-15

發送簡訊給我
#1 引用回覆 回覆 發表時間:2006-12-15 17:55:38 IP:220.229.xxx.xxx 未訂閱
如何使用ADOConnection連結Oracle時可以指定連結資料庫
我使用的連結語法如下:
sOrclConnect := 'Provider=MSDAORA.1;Password=%pw%;User ID=%uid%;Data Source=%ds%;Persist Security Info=True';
可以成功連結,上述並未指定欲連結的資料庫,
我想連結應是預設資料庫,
但資料庫可以設定多個,
所以想知道是否應多加何種參數,
才可以指定欲連結的資料庫?

------
小王
Coffee
版主


發表:31
回覆:878
積分:561
註冊:2006-11-15

發送簡訊給我
#2 引用回覆 回覆 發表時間:2006-12-15 18:09:15 IP:220.228.xxx.xxx 未訂閱
據說Delphi都有附Help,據說Help查TADOConnection有下面這東西

Indicates the database the ADO connection uses by default.

property DefaultDatabase: WideString;

Description

Set DefaultDatabase to indicate the database the ADO connection objects uses if the connection to the database specified in ConnectionString is unavailable, the connection cannot be made, or the database is not specified in the connection string.

Note: If a default database is specified in the ConnectionString property, it has precedence over the value in DefaultDatabase. The DefaultDatabase value is automatically changed to the database specified in ConnectionString when the connection component is opened.
------
不論是否我發的文,在能力範圍皆很樂意為大家回答問題。
為了補我的能力不足之處,以及讓答案可以被重複的使用,希望大家能儘量以公開的方式問問題。
在引述到我的文時自然會儘量替各位想辦法,謝謝大家!
系統時間:2024-05-19 18:04:27
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!