SQLCA.DBMS ="SYC Adaptive Server Enterprise"
SQLCA.Database ="zbbatest"
SQLCA.ServerName ="zbbatest"
SQLCA.LogId ="sa"
SQLCA.Logpass =""
SQLCA.AutoCommit = False
SQLCA.DBParm = ""
connect using sqlca;
if sqlca.sqlcode<>0 then
messagebox("Information","連接zbbatatest資料庫錯誤:~r~n~r~n錯誤詳細資訊:~r~n"+sqlca.sqlerrtext,stopsign!)
return
end if
open(w_mdi_out)
這是別人給我發的源代碼的一部分,意思應該是設定資料庫的一些引數吧
我想知道,我要運行這個程式,我需要怎么連接資料庫
我運行程式的時候提示錯誤ct_connect();directory service layer;interual directory control layer error.requested server name not found
uj5u.com熱心網友回復:
你要連的數據庫是sybase ase 嗎,如果是用這個可以連,但需先確保客戶端可以連上uj5u.com熱心網友回復:
SQLCA.DBMS ="SYC Adaptive Server Enterprise"//設定連接方式SQLCA.Database ="zbbatest"//資料庫名稱
SQLCA.ServerName ="zbbatest"//資料庫服務器位置、網路地址、服務器名稱
SQLCA.LogId ="sa"//資料庫賬號
SQLCA.Logpass =""//資料庫密碼
SQLCA.AutoCommit = False//是否自動提交
SQLCA.DBParm = ""
connect using sqlca;//連接
這段就是連接資料庫的代碼
那個錯誤提示,你要確定資料庫名稱,服務器位置,連接方式有沒有錯。
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/65203.html
標籤:數據庫相關
上一篇:PB script中用了個控制元件,找不到這個控制元件的位置
下一篇:請教:操作Excel檔案問題
