ARITHABORT problem
- From: "Keith G Hicks" <krh@xxxxxxxxxxx>
- Date: Sat, 29 Oct 2005 19:46:47 -0400
I'm running D7 and MS SQL 2000. I have a calculated indexed column that is
causing me some problems. When I run a stored procedure from my application
that inserts new rows into the table, I get an ARITHABORT error. When I run
the same stored procedure from the MS SQL QA it works fine. Apparently
that's because QA has ARITHABORT turned ON by default where that's not the
case when calling the procedure from the client application. My question is
does anyone know how I can turn it on just before executing the stored
procedure? Here's what I'm doing below. The detials are not really important
because all of t he below works just fine if I remove the index on the
calculated column in the backend. The error occurs of course when the
procedure executes. I need to know what to do just before the ExecProc line
to turn ARITHABORT on. Does anyone know how to do that?
stprAddNewTrans := TADOStoredProc.Create(nil);
with stprAddNewTrans do
try
Connection := dmMyDataMod.cnnMyConnection;
ProcedureName := 'spAddNewOrUpdateTrans';
with Parameters do
begin
Refresh;
ParamByName('@sUserName').Value := sLoggedInUsersName;
ParamByName('@iBankAcctID').Value := lkCboXferFromBankAcct.EditValue;
ParamByName('@sTransDate').Value := FormatDateTime('mm/dd/yyyy',
dteCboXferDate.EditValue);
ParamByName('@sCheckNum').Value := 'XFR';
ParamByName('@sPayee').Value := 'Transfer from ' +
Trim(lkCboXferFromBankAcct.EditingText) + ' to ' +
Trim(lkCboXferToBankAcct.EditingText);
ParamByName('@mDebitAmt').Value := mskTxtXferAmt.EditValue;
ParamByName('@mCreditAmt').Value := null;
ParamByName('@sTransMemo').Value := '';
ParamByName('@sTransCat').Value := '';
ParamByName('@iXferBankAcctID').Value :=
lkCboXferToBankAcct.EditValue;
ParamByName('@sTempIDField').Value := CreateClassID;
ParamByName('@iNewTransID').Value := 0;
end;
Prepared := True;
ExecProc; // <<<<<<<< ERROR OCCURS HERE
(* If successfull then sRetStatus is <> 0 *)
iNewTransID := Parameters.ParamByName('@iNewTransID').Value;
Prepared := False;
finally
Free;
end;
Thanks,
Keith
.
- Prev by Date: Re: DBF WITH EXTENSION OTHER THAN .DBF ( I.E. DAT )
- Next by Date: Re: Recovering from an updatebatch error with a clone
- Previous by thread: Re: DBF WITH EXTENSION OTHER THAN .DBF ( I.E. DAT )
- Index(es):
Relevant Pages
|
|