string ls_inifile ="dsmis.ini"
sqlca.DBMS = ProfileString (ls_inifile, "database", "dbms", "")
sqlca.database = ProfileString (ls_inifile, "database", "database", "")
sqlca.logid = ProfileString (ls_inifile, "database", "logid", "")
sqlca.logpass = ProfileString (ls_inifile, "database", "LogPassWord","")
sqlca.servername=ProfileString(ls_inifile,"database", "servername", "")
sqlca.dbparm = ProfileString (ls_inifile, "database", "dbparm", "")
sqlca.userId = ProfileString (ls_inifile, "database", "userId", "")
sqlca.DBPass = ProfileString (ls_inifile, "database", "DBPass", "")
sqlca.Lock = ProfileString (ls_inifile, "database", "Lock", "")
sqlca.autocommit=false;
connect using sqlca;
if sqlca.sqlcode <>0 then
messagebox("資料庫連接","sqlca.sqlerrtext")
return
else
open(mian)
end if
我運行的時候提示sqlca.sqlerrtext。請各位幫我看看是那里出了問題啊
uj5u.com熱心網友回復:
你的資料庫連接的關鍵字都是取自ini檔案。將ProfileString (ls_inifile, "database", "dbms", "") 定義變數后逐個查看是否有回傳值。
uj5u.com熱心網友回復:
這個要看dsmis.ini里面的配置uj5u.com熱心網友回復:
我用跟棕方式查看ls_inifile,這個值不直都沒有變過。uj5u.com熱心網友回復:
messagebox("資料庫連接","sqlca.sqlerrtext")改成
messagebox("資料庫連接",sqlca.sqlerrtext)
uj5u.com熱心網友回復:
messagebox函式的格式MessageBox ( title, text {, icon {, button {, default } } } )
有以下引數:
title表示的是messagebox的標題,型別為string ;
text表示的是messagebox需要顯示的內容,型別為string ;
以下為可選項:
icon表示的是messagebox中要顯示的圖示,為列舉型別,有以下合法值:information! (訊息,默認值);StopSign!(錯誤);Exclamation!(提示);Question!(提問);None!(不顯示圖示) ;
button表示的是messagebox中要顯示的按鍵,為列舉型別,有以下合法值:OK!(確定,默認值);OKCancel!(確定,取消);YesNo!(是,否);YesNoCancel!(是,否,取消);RetryCancel!(重試,取消);AbortRetryIgnore!(中斷,重試,忽略);
default表示的是messagebox中作為默認按鈕的按鍵,其值為:1(默認值);2;3
messagebox函式回傳值為integer。執行成功則回傳所選擇的按鍵的值,失敗回傳-1;若任意引數為null,則回傳null
uj5u.com熱心網友回復:
接分是王道!uj5u.com熱心網友回復:
有點難度哦uj5u.com熱心網友回復:
什么呀轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/109292.html
標籤:數據庫相關
下一篇:mssoap 發布問題
