Home  >  Article  >  Database  >  ADO连接MS SQL SERVER 2000程序

ADO连接MS SQL SERVER 2000程序

WBOY
WBOYOriginal
2016-06-07 17:47:141018browse

ado连接ms sql server 2000程序

function adothread(param: pointer): integer; stdcall;
var
  con, cmd : variant;
begin
  coinitialize(nil);
  con := getnewconnection(...);
  if varisempty(con) then
  begin
  //未连接上,退出
  exit;
  end eles 
  cmd := getnewcommand(con)
  while bterminate do
  begin
  if varisempty(con) then
  //连接失败 退出
  exit
  else
  sleep(1000);
  end;
  closeconnection(con); //自定义的关闭函数。 其实测试时,
  cmd := unassigned;
  couninitialize;
  result := 0;
end;
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn