Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieve function return -1 on windows XP

Status
Not open for further replies.

alia01

Programmer
May 4, 2001
2
US
An accounting system runs 35 function at the end of the day
each function has its own retrieve and update statement
each function uses direct SQL statement no SP
all functions are in a NVO

data comes from SQL2000
PB is 7.0.03 build 10009
it ran fine on WINDOWS NT/2000 for last three years
it is on Window XP client now
I OFTEN see retrieve( with or without parameters) returns < 0 which I never seen before on NT/2000, in any of the 35 function when APP runs these functions in a sequence one after the another. the retrival failure is not in any one function, any business function out of 35 can fail because of the retival failed. (most of the retrival statements are at the begining of the function)

i.e.
on of the place where it is failing and even failed where retrival agruments is not specified too.

lds_balance_od = create n_ds
lds_balance_od.dataobject = &quot;ds_cams_transaction_od_account_ra&quot;
lds_balance_od.settransobject(sqlca)
ll_bal_rows = lds_balance_od.retrieve(adt_process_date)
if ll_bal_rows < 0 then
gi_index ++
gs_timer_link[gi_index] = 'Database Error - Balance Record Retrival for Overdraft Processing Failed - Please Contact IS'
return -1
end if

Please help, I am working late nights to fix it.
Thanks
 
I would certainly add some database error checking to your if statement....you may find it is actually something other than the statement.... just an idea

If ll_bal_rows < 0 Then
IF SQLCA.SQLCODE <> 0 THEN
IF SQLCA.SQLDBCODE <> 0 THEN
gi_index ++
gs_timer_link[gi_index] =String (SQLCA.SQLDBCODE)+SQLCA.SQLErrText
RETURN -1
END IF
END IF
gi_index ++
gs_timer_link[gi_index] = 'Database Error - Balance Record Retrival for Overdraft Processing Failed - Please Contact IS'
return -1


END IF
 
i would definitely check for the success of settransobject
b'coz at times there could be a typo while assigning the dataobject to the datastore
int li_ret
lds_balance_od = create n_ds
lds_balance_od.dataobject = &quot;ds_cams_transaction_od_account_ra&quot;
li_ret = lds_balance_od.settransobject(sqlca)
if li_ret = 1 then
//further processing
else
//error processing
end if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top