sql怎么創(chuàng)建數(shù)據(jù)庫 Delphi如何與SQL數(shù)據(jù)庫連接?
Delphi如何與SQL數(shù)據(jù)庫連接?連接1。Connectionstring:=“provider=sqloledb。1Password=123persist Security Info=trueus
Delphi如何與SQL數(shù)據(jù)庫連接?
連接1。Connectionstring:=“provider=sqloledb。1Password=123persist Security Info=trueuser id=sainitial catalog=sampledata source=?!?/p>
adoconnection1。Loginprompt:=false
adoconnection1。Connected:=true
上面的代碼是SQL數(shù)據(jù)庫的連接方法:最后一句話是data source=the“.”表示數(shù)據(jù)庫在本地計算機上。如果數(shù)據(jù)在其他位置,請將點更改為IP地址或服務器名稱。示例是我的數(shù)據(jù)庫名,可以改成你自己的,123是密碼,也可以改成你自己的