Subject | Re: [IBO] Help! TDataset in IBO 5.0.2 misbehaving |
---|---|
Author | Chuck Belanger |
Post date | 2012-10-13T02:24:52Z |
Hi, Jason:
Sometimes simply writing up the problem and stating a question can help
me resolve the issue.
In this case, as the program was being developed, I started with Patient
data being unscrambled, then later added a basic data scrambling
function to the name, phone, address, etc. I was using the AfterPost
event in a wwDBGrid to scramble the data and it continued to work fine
after creating calculated fields with the function f_str2str (this is a
function I added to the FreeUDFLib library). Actually, it seems in hind
sight that the IBODataset should not have properly posted, but it did.
What I was asking about was why the AfterPost was not working, but
realized that it really should not have before either. I modified my
program to use BeforePost since the field data still exists from an edit
control at that point (the Dataset.FieldbyName() values disappear on
post) and I can update just fine in the BeforePost event. I am using
AfterPost to scramble the relevant patient data fields.
Everything is fine. Thanks for the response.
Hope all is well with you,
Chuck
Sometimes simply writing up the problem and stating a question can help
me resolve the issue.
In this case, as the program was being developed, I started with Patient
data being unscrambled, then later added a basic data scrambling
function to the name, phone, address, etc. I was using the AfterPost
event in a wwDBGrid to scramble the data and it continued to work fine
after creating calculated fields with the function f_str2str (this is a
function I added to the FreeUDFLib library). Actually, it seems in hind
sight that the IBODataset should not have properly posted, but it did.
What I was asking about was why the AfterPost was not working, but
realized that it really should not have before either. I modified my
program to use BeforePost since the field data still exists from an edit
control at that point (the Dataset.FieldbyName() values disappear on
post) and I can update just fine in the BeforePost event. I am using
AfterPost to scramble the relevant patient data fields.
Everything is fine. Thanks for the response.
Hope all is well with you,
Chuck
> Chuck,
>
> Sorry for my lack of attention. I've had my head down and been plowing.
>
> Could you possibly send me a sample showing the problem?
>
> Thanks,
> Jason
>
> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf
> Of Chuck Belanger
> Sent: 28 September 2012 04:18 PM
> To: IBObjects@yahoogroups.com
> Subject: Re: [IBO] Help! TDataset in IBO 5.0.2 misbehaving
>
> Ok, after looking at this and seeing if there are other examples of POST
> not posting what is in the various editors, I can see that this
> qryPatientSession is the only one.
>
> I am assuming that the reason things are not being posted is because of
> the calculated field (f-str2str() as FieldName). At this point the real
> question is: why did it work before?
>
> What is helpful for other calculated field uses is that one can access
> the editor values via the Dataset.FieldByName() just fine right up to
> the POST, then in the AfterPost one can do an UPDATE to put the
> calculated value back into the table.
>
> Chuck Belanger
>
>
>> Hello:
>>
>> I have been using D2007 with FB 2.5 with IBO 4.8.7 with a Woll2Woll
>> RecordViewPanel which requires TDataset to add patients to the local DB.
>> The patient data is encrypted. Everything has been working fine for over
>> a year. Now with IBO 5.0.2 (_b52a update) in XE2, the entered data is
>> not posted. Below is the salient code and what I am observing:
>>
>> WITH qryPatientSession DO
>> BEGIN
>> //decrypting all encrypted patient fields
>> SQL.Add('Select f_str2str(Name_First,' + inttoStr(TV.HPW)+') as
>> Name_First,');
>> SQL.Add('F_Str2Str(Name_Last,' +InttoStr(TV.HPW)+') as Name_Last,');
>> SQL.Add('F_Str2Str(Upper_Name_Last,' +InttoStr(TV.HPW)+') as
>> Upper_Name_Last,');
>> SQL.Add('F_Str2Str(Address1,'+InttoStr(TV.HPW)+') as Address1,');
>> SQL.Add('F_Str2Str(Address2,'+InttoStr(TV.HPW)+') as Address2,');
>> SQL.Add('F_Str2Str(City,'+InttoStr(TV.HPW)+') as City, ');
>> SQL.Add('F_Str2Str(State,'+InttoStr(TV.HPW)+') as State, ');
>> SQL.Add('F_Str2Str(Country,'+InttoStr(TV.HPW)+') as Country, ');
>> SQL.Add('F_Str2Str(Postal_Code,'+InttoStr(TV.HPW)+') as Postal_Code, ');
>> SQL.Add('F_Str2Str(Phone,'+InttoStr(TV.HPW)+') as Phone, ');
>> SQL.Add('F_Str2Str(Email,'+InttoStr(TV.HPW)+') as Email, ');
>> SQL.Add('F_Str2Str(Cell_Phone,'+InttoStr(TV.HPW)+') as Cell_Phone,');
>> SQL.Add('F_Str2Str(Work_Phone,'+InttoStr(TV.HPW)+') as Work_Phone,');
>>
>> SQL.Add('PT_ID,');
>> SQL.Add('PR_ID,');
>> SQL.Add('FIRST_VISIT, ');
>> SQL.Add('BIRTHDATE, ');
>> SQL.Add('GENDER, ');
>>
>
>
> ------------------------------------
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more !
> Yahoo! Groups Links
>
>
>
>
>
> ------------------------------------
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more ! Yahoo! Groups Links
>
>
>
>