私はinno for ms sqlスクリプトを使用してインストールパッケージを作成しています。InnoパッケージでSQL文を実行した後、sqlcmd.exeがハングしています
strParam := '-U hel -P password -S ServerName -d test -Q "sp_test"';
try
Exec('sqlcmd.exe', strParam, '', SW_SHOW, ewWaitUntilTerminated, ResultCode);
result := ResultCode = 0;
except
Exec('osql.exe', strParam, '', SW_SHOW, ewWaitUntilTerminated, ResultCode);
result := ResultCode = 0;
end;
Spは実行されますが、sqlcmd.exeを使用して黒い画面が終了するか閉じます。私は、spが実行された後にsqlcmd.exeを閉じてウィンドウを開きたい。
それが判明したように、コンピュータのメモリに問題があった。いくつかの実行中のアプリケーションを閉じると、コードが正しく動作するようになりました。御時間ありがとうございます。 –