$PBExportHeader$w_sys_begin_pulg.srw forward global type w_sys_begin_pulg from w_publ_base end type type p_1 from picture within w_sys_begin_pulg end type end forward global type w_sys_begin_pulg from w_publ_base integer x = 379 integer y = 288 integer width = 2295 integer height = 1388 boolean titlebar = false string title = "" boolean controlmenu = false boolean minbox = false windowtype windowtype = response! long backcolor = 16777215 event connectdb pbm_custom01 p_1 p_1 end type global w_sys_begin_pulg w_sys_begin_pulg event connectdb;environment lenv_env // holds environment information //string ls_startupfile // holds name of start-up file // Get the environment information If ( GetEnvironment(lenv_env) <> 1 ) THEN MessageBox( "Application: Open", & "Unable to get environment information.~nHalting ..." ) // HALT END IF // Select start-up file by operating system CHOOSE CASE lenv_env.OSType CASE windows!, windowsnt! // ls_startupfile = "car_wiz.ini" // if ( lenv_env.charset = charsetunicode! ) then // ls_startupfile = "pbu.ini" // end if CASE ELSE MessageBox( "Application: Open", & "Unrecognized operating system.~nHalting ..." ) HALT END CHOOSE //Populate sqlca from current preference-file settings sys_ServerNameFJ = ProfileString (sys_inifilename, "fjdatabase", "servername", "") sys_DataBaseFJ = ProfileString (sys_inifilename, "fjdatabase", "database", "") sys_LoginIDFJ = ProfileString (sys_inifilename, "fjdatabase", "logid", "") sys_LoginPwdFJ = ProfileString (sys_inifilename, "fjdatabase", "LogPassWord", "") //MessageBox('', sys_ServerNameFJ + ';' + sys_DataBaseFJ + ';' + sys_LoginIDFJ + ';' + sys_LoginPwdFJ) sqlca.DBMS = ProfileString (sys_inifilename, "database", "dbms", "") sqlca.Database = ProfileString (sys_inifilename, "database", "database", "") sqlca.UserID = ProfileString (sys_inifilename, "database", "userid", "") sqlca.DBPass = f_psw_bczh(ProfileString (sys_inifilename, "database", "dbpass", ""),1,sys_power_key) sqlca.LogID = ProfileString (sys_inifilename, "database", "logid", "") sqlca.LogPass = f_psw_bczh(ProfileString (sys_inifilename, "database", "LogPassWord", ""),1,sys_power_key) sqlca.ServerName = ProfileString (sys_inifilename, "database", "servername", "") SQLCA.Lock = "RC" SQLCA.AutoCommit = false sqlca.DBParm = "Database= '" + ProfileString (sys_inifilename, "database", "database", "") + "',PBTrimCharColumns='YES'" //MessageBox('', sqlca.ServerName + ';' + sqlca.database + ';' + sqlca.LogID + ';' + sqlca.logpass) //MessageBox("系统提示","1!") IF sqlca.Database = '' OR sqlca.ServerName = '' THEN MessageBox("系统提示","连接数据库失败!") OpenWithParm(w_set_sqlca_response,1) //0 只设连接信息 1 并允许自动新建数据库(启动首次调用) HALT END IF CONNECT USING sqlca; //MessageBox("系统提示","2!") IF sqlca.SQLCode < 0 THEN MessageBox("系统提示","连接数据库失败!") OpenWithParm(w_set_sqlca_response,1) //0 只设连接信息 1 并允许自动新建数据库(启动首次调用) HALT END IF EXECUTE IMMEDIATE "set transaction isolation level READ UNCOMMITTED"; //execute immediate "set transaction isolation level REPEATABLE READ"; //messagebox("",sqlca.sqlcode) IF sqlca.SQLCode <> 0 THEN MessageBox("系统提示","设置SQL服务器系统属性失败!"+sqlca.SQLErrText) HALT; END IF //MessageBox("系统提示","3!") Close(THIS) end event on w_sys_begin_pulg.create int iCurrent call super::create this.p_1=create p_1 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.p_1 end on on w_sys_begin_pulg.destroy call super::destroy destroy(this.p_1) end on event timer;//CLOSE(THIS) end event event clicked;//close(this) end event event key;//CLOSE(THIS) end event event open;call super::open;this.title = '正在连接数据库......' //messagebox("","连接数据库") THIS.postevent('connectdb') end event event ue_before_open;p_1.PictureName=sys_flashbmpname //开始窗口的图片名称 this.height=p_1.height this.width=p_1.width end event type cb_func from w_publ_base`cb_func within w_sys_begin_pulg boolean visible = false boolean enabled = false end type type cb_exit from w_publ_base`cb_exit within w_sys_begin_pulg boolean visible = false boolean enabled = false end type type p_1 from picture within w_sys_begin_pulg integer width = 2286 integer height = 1304 boolean bringtotop = true string pointer = "Select.cur" boolean originalsize = true string picturename = "flashwinpic.bmp" boolean focusrectangle = false end type event clicked;//close(parent) end event