var str_sjklx_path:string;
begin
  try
    with form_data.adoty do
    begin
      close;
      sql.clear;
      sql.add('select * from card_ydxm');
      open;
    end;
    application.messagebox(pchar('数据库已经升级成功，无需重复升级！'),'提示',mb_ok+mb_iconinformation);
  except
    if form_main.edit_yncx.text='-1' then
      str_sjklx_path:=extractfilepath(application.exename)+'\data\card_ydxm_A.ini' //使用A版数据
    else    //='1'
      str_sjklx_path:=extractfilepath(application.exename)+'\data\card_ydxm_S.ini'; //使用S版数据
    With form_data.adoty1 do
    begin
      Close;
      SQL.Clear;
      SQL.LoadFromFile(str_sjklx_path);
      execsql;
    end;
    application.messagebox(pchar('会员卡预订项目数据库升级成功！'),'提示',mb_ok+mb_iconinformation);
  end;
end;