免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
ClientDataSet的隱含功能-3
begin
  try
  Result := CreateOleObject(\’ADODB.Connection\’);
  Result.CursorLocation := adUseServer;
  Result.IsolationLevel := adXactCursorStability;
  Result.Mode := adModeReadWrite;
  Result.Provider := \’SQLOLEDB.1\’;
  except
  if not VarIsEmpty(Result) then Result := Unassigned;
  end;
  end;
  procedure FreeConnection(var cnn: OleVariant);
  begin
  if not VarIsEmpty(cnn) then
  begin
  if cnn.State <> adStateClosed then cnn.Close;
  cnn := Unassigned;
  end;
  end;
  function CreateRecordset: OleVariant;
  begin
  try
  Result := CreateOleObject(\’ADODB.Recordset\’);
  Result.CacheSize := 1000;
  Result.CursorType := adOpenStatic;
  Result.CursorLocation := adUseServer;
  Result.LockType := adLockOptimistic;
  except
  if not VarIsEmpty(Result) then Result := Unassigned;
  end;
  end;
  procedure FreeRecordset(var rst: OleVariant);
  begin
  FreeConnection(rst);
  end;
  function CreateCommand: OleVariant;
  begin
  try
  Result := CreateOleObject(\’ADODB.Command\’);
  Result.CommandType := adCmdText;
  Result.CommandTimeout := 5;
  except
  if not VarIsEmpty(Result) then Result := Unassigned;
  end;
  end;
  procedure FreeCommand(var cmd: OleVariant);
  begin
  if not VarIsEmpty(cmd) then cmd := Unassigned;
  end;
  function ConnectToDB(cnn: OleVariant; const db, host, usr, pwd: string): Boolean;
  begin
  Result := not VarIsEmpty(cnn);
  if Result then
  begin
  if cnn.State <> adStateClosed then cnn.Close;
  cnn.ConnectionString :=
  \’Provider=SQLOLEDB.1;Persist Security Info=True;Initial Catalog=\’ +
  db + \’;Data Source=\’ + host + \’;Connect Timeout=5;\’ +
  \’Use Procedure for Prepare=1\’;
  try
  cnn.Open(cnn.ConnectionString, usr, pwd, -1);
  except
  Result := False;
  end;
  end;
  end;
  function ExecSQL(cnn, rst: OleVariant; const sql: string): Boolean;
  begin
  Result := not (VarIsEmpty(cnn) or VarIsEmpty(rst)) and (cnn.State = adStateOpen);
  if Result then
  begin
  if rst.State <> adStateClosed then rst.Close;
  try
  rst.Open(sql, cnn, adOpenStatic, adLockOptimistic, adCmdText);
  except
  Result := False;
  end;
  end;
  end;
  function ExecSQLA(cnn, cmd: OleVariant; const sql: string): Boolean;
  begin
  Result := not (VarIsEmpty(cnn) or VarIsEmpty(cmd)) and (cnn.State = adStateOpen);
  if Result then來(lái)源
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開(kāi)APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
ParamsToVariant and VariantToParams
Delphi Variants
Delphi, olevariants and arrays of strings
delphi中判斷字符串是否為數(shù)字
文件批量改名工具官網(wǎng)–新起飛部落 ? lazarus UTF8 unicode
導(dǎo)出Excel
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服