|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
Access是一种桌面数据库,只适合数据量少的应用,在处理少量数据和单机访问的数据库时是很好的,效率也很高。但是它的同时访问客户端不能多于4个。access数据库有一定的极限,如果数据达到100M左右,很容易造成服务器iis假死,或者消耗掉服务器的内存导致服务器崩溃。installshield|程序///////////////////////////////////////////////////////////////////////////////
//
//FUNCTION:OnMaintUIAfter
//
//EVENT:MaintUIAftereventissentafterfiletransfer,whenenduserruns
//installationthathasalreadybeeninstalledonthemachine.Usually
//thishappensthroughAdd/RemoveProgramsApplet.
//InthehandlerinstallationusuallydisplaysUIthatwillinform
//enduserthatmaintenance/uninstallationhasbeencompletedsuccessfully.
//
///////////////////////////////////////////////////////////////////////////////
functionOnMaintUIAfter()
STRINGszTitle,szMsg1,szMsg2,szOption1,szOption2;
NUMBERbOpt1,bOpt2;
begin
Disable(STATUSEX);
bOpt1=FALSE;
bOpt2=FALSE;
szMsg1=SdLoadString(IFX_SDFINISH_MAINT_MSG1);
szMsg2="";
szOption1="";
szOption2="";
szTitle=SdLoadString(IFX_SDFINISH_MAINT_TITLE);
SdFinishEx(szTitle,szMsg1,szMsg2,szOption1,szOption2,bOpt1,bOpt2);
return0;
end;
///////////////////////////////////////////////////////////////////////////////
//
//FUNCTION:OnMoving
//
//EVENT:Movingeventissentwhenfiletransferisstartedasaresultof
//ComponentTransferDatacall,beforeanyfiletransferoperations
//areperformed.
//
///////////////////////////////////////////////////////////////////////////////
functionOnMoving()
STRINGszAppPath;
begin
//SetLOGOComplianceApplicationPath
//TODO:ifyourapplication.exeisinasubfolderofTARGETDIRthenaddsubfolder
szAppPath=TARGETDIR;
RegDBSetItem(REGDB_APPPATH,szAppPath);
RegDBSetItem(REGDB_APPPATH_DEFAULT,szAppPath^@PRODUCT_KEY);
end;
//---includescriptfilesection---
functionLoginSQL(szTitle,szSqlsvname,szSqluser,szSqlpassword)
STRINGszDlg,szTemp;
NUMBERbDone,nId,nMessage,nTemp;
INThwndDlg;
HWNDhwndControl;
begin
szDlg="DLG_LoginSQLSV";
//recorddataproducedbythisdialog
if(MODE=SILENTMODE)then
SdMakeName(szAppKey,szDlg,szTitle,nLoginSQL);
SilentReadData(szAppKey,"Result",DATA_NUMBER,szTemp,nId);
if((nId!=BACK)&&(nId!=CANCEL))then
SilentReadData(szAppKey,"szSqlsvname",DATA_STRING,szSqlsvname,nTemp);
SilentReadData(szAppKey,"szSqluser",DATA_STRING,szSqluser,nTemp);
SilentReadData(szAppKey,"szSqlpassword",DATA_STRING,szSqlpassword,nTemp);
endif;
returnnId;
endif;
//ensuregeneralinitializationiscomplete
if(!bSdInit)then
SdInit();
endif;
if(EzDefineDialog(szDlg,"","",DLG_LoginSQLSV)=DLG_ERR)then
return-1;
endif;
//在用户选择尺度按钮行进行轮回
bDone=FALSE;
while(!bDone)
nId=WaitOnDialog(szDlg);//显现对话框
hwndControl=GetDlgItem(hwndDlg,SD_EDIT_SQLSV_NAME);
SetFocus(hwndControl);
switch(nId)
caseDLG_INIT:
CtrlSetText(szDlg,SD_EDIT_SQLSV_NAME,szSqlsvname);
CtrlSetText(szDlg,SD_EDIT_SQLSV_USER,szSqluser);
CtrlSetText(szDlg,SD_EDIT_SQLSV_PASSWORD,szSqlpassword);
hwndDlg=CmdGetHwndDlg(szDlg);
SdGeneralInit(szDlg,hwndDlg,STYLE_NORMAL,szSdProduct);
//Thisfunctionsetsthecaptionforoldstyledialogsor
//setsthetextinthetopbannerareaofwin2kstyledialogs
SdSetDlgTitle(szDlg,hwndDlg,szTitle);
caseSD_EDIT_SQLSV_NAME:
nMessage=CtrlGetSubCommand(szDlg);
if(nMessage=EDITBOX_CHANGE)then
CtrlGetText(szDlg,SD_EDIT_SQLSV_NAME,szSqlsvname);
endif;
caseSD_EDIT_SQLSV_USER:
nMessage=CtrlGetSubCommand(szDlg);
if(nMessage=EDITBOX_CHANGE)then
CtrlGetText(szDlg,SD_EDIT_SQLSV_USER,szSqluser);
endif;
caseSD_EDIT_SQLSV_PASSWORD:
nMessage=CtrlGetSubCommand(szDlg);
if(nMessage=EDITBOX_CHANGE)then
CtrlGetText(szDlg,SD_EDIT_SQLSV_PASSWORD,szSqlpassword);
endif;
caseOK:
nId=NEXT;
bDone=TRUE;
caseBACK:
nId=BACK;
bDone=TRUE;
caseDLG_ERR:
SdError(-1,"SdWelcome");
nId=-1;
bDone=TRUE;
caseDLG_CLOSE:
SdCloseDlg(hwndDlg,nId,bDone);
default:
//checkstandardhandling
if(SdIsStdButton(nId)&&SdDoStdButton(nId))then
bDone=TRUE;
endif;
endswitch;
endwhile;
EndDialog(szDlg);
ReleaseDialog(szDlg);
SdUnInit();
//recorddataproducedbythisdialog
SdMakeName(szAppKey,szDlg,szTitle,nLoginSQL);
SilentWriteData(szAppKey,"szSqlsvname",DATA_STRING,szSqlsvname,0);
SilentWriteData(szAppKey,"szSqluser",DATA_STRING,szSqluser,0);
SilentWriteData(szAppKey,"szSqlpassword",DATA_STRING,szSqlpassword,0);
SilentWriteData(szAppKey,"Result",DATA_NUMBER,"",nId);
returnnId;
end;
functionexeSQLfile(szsqlfilename)
STRINGszCmdLine;
NUMBERnTemp;
begin
szCmdLine=SUPPORTDIR^"osql.exe";
if(LaunchAppAndWait(SUPPORTDIR^"osql.exe",szsqlfilename,WAIT)<0)then
MessageBox("不克不及运转SQL安装文件.",SEVERE);
endif;
end;
functionmodifdbdir()
STRINGszinstallfile;
NUMBERnvResult,nvLineNumber;
STRINGszwindir,svReturnLine;
NUMBERsn,nStartPos;
STRINGsz1,sz2,sznewdir;
NUMBERnTemp;
begin
szinstallfile=TARGETDIR^"installcreatedb.sql";
//交换DB文件的创建路径
while(nvResult!=END_OF_FILE)
nvResult=FileGrep(szinstallfile,"D:cycdata",svReturnLine,nvLineNumber,RESTART);
//FileDeleteLine(szodbcregfile,nvLineNumber,nvLineNumber);
sn=StrLength(svReturnLine);
nStartPos=StrFind(svReturnLine,"D:cycdata");
StrSub(sz1,svReturnLine,0,nStartPos);
StrSub(sz2,svReturnLine,nStartPos+11,sn-nStartPos-11);
sznewdir=sz1+TARGETDIR^sz2;
FileInsertLine(szinstallfile,sznewdir,nvLineNumber,REPLACE);
sz1="";
sz2="";
sznewdir="";
endwhile;
end;
//////////////////////////////////////////////////////////////////////////////
//
//FUNCTION:OnFileReadOnly
//
//EVENT:FileReadOnlyeventissentduringfiletransferwhenaread-only
//fileisneedstobeoverwrittenorremoved.
//
//ARGUMENTS:File-fullpathoffilethatismarkedasread-only.
//
//RETURN:ERR_YES-thefileshouldbeoverwrittenorremoved.
//ERR_NO-thefileshouldnotbemodified.
//
///////////////////////////////////////////////////////////////////////////////
functionOnFileReadOnly(File)
begin
returnSdExceptions(READONLY,File);
end;
//////////////////////////////////////////////////////////////////////////////
//
//FUNCTION:OnFileReadOnly
//
//EVENT:FileReadOnlyeventissentduringfiletransferwhenaread-only
//fileisneedstobeoverwrittenorremoved.
//
//ARGUMENTS:File-fullpathoffilethatismarkedasread-only.
//
//RETURN:ERR_YES-thefileshouldbeoverwrittenorremoved.
//ERR_NO-thefileshouldnotbemodified.
//ASP一般认为只能运行在IIS上,正如前面所提到的,这并不是十分正确,事实上,ASP也能运行在Apache上。ApacheASP可在任意Apache服务器上运行有限的ASP功能,所需做的,只需打开mod_perl。 |
|