|
正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- [Code]
- procedure SaveSecureKey;
- var
- AccessServer: Variant;
- RecordAffected: Integer;
- begin
- try
- AccessServer := CreateOleObject ('ADODB.Connection');
- except
- RaiseException ('Failed to create ADODB object!');
- end;
-
- AccessServer.ConnectionString := Format (
- 'Provider=%s;Data Source=%s%s;Persist Security Info=False;' +
- 'Jet OLEDB:Database Password=123456',
- ['Microsoft.Jet.OLEDB.4.0', 'd:/temp/', 'data.mdb']);
- try
- AccessServer.Open;
- try
- AccessServer.Execute ('DELETE * FROM dic_SysParams');
- AccessServer.Execute (
- Format ('INSERT INTO dic_SysParams(Sp_SecureKey)' +
- 'values (''%s'');', ['1234567890']));
- except
- RaiseException ('Failed to initialize secure key value!');
- end;
- finally
- AccessServer.Close;
- end;
- end;
复制代码
|
|