v4.1.1 form migration issue

PascalVB

Member²
i have a form with TOracleDataSet, sql text contains parameter :id
before i open this form with installed DOA 4.1.1 dfm contained property value (in BDS 2006)
Variables.Data = {0300000001000000030000003A4944050000000000000000000000}

after resaving form
Variables.Data = {0400000001000000060000003A494400303B050000000000000000000000}
After this form cannot be opened in runtime (from) application
Nither in BDS 2006 builded app, no in delphi 2009 builded app

If i revert changes and resave this form in delphi 2009
Variables.Data = {0400000001000000060000003A0049004400050000000000000000000000}
And form can be opended in runtime in delphi 2009 build

We need solution for success saving such forms bds 2006
 
ORA-01036: illegalvariable name/number
and then other error message:
Variable :ID not declared
oracle monitor shows ?D? variable instead of ID
seems that delphi 2006 implementation of converting Variables.Data to new version wrong
 
This indicates that the executable is linked with an old version of the dcu files, whereas the Delphi IDE works with the new version of the design-time package. Can you uninstall Direct Oracle Access, make sure that there are no Oracle*.* files and doa*.* files left in the Delphi search directories, and reinstall?
 
I Ensure that no DOA installed
Make clean installation of DOA 4.1.1 for Delphi 2006
1. make new application
2. put TOracleSession, TOracleDataSet on form
3. set in SQL Editor something like
4. select * from myTable where myTable_ID = :ID
5. go to variable editor
6. press scan SQL -> ID:STRING variable found
7. ensure that query runned successfully in design time
8. make session => connected, dataset=>active : all ok
9. save changes
9. run app -> error from post 1 appears
in dfm i see:
Variables.Data = {0400000001000000060000003A494400301A050000000000000000000000}
but in i close unit form in designer
and make changes in dfm
Variables.Data = {0300000001000000060000003A494400301A050000000000000000000000}
version changed - then rubild and run app all ok
 
i found error - it was in TVariables.WriteBinaryData
there was:
WriteBuffer(PChar(Name)^, Temp);
but should be:
WriteBuffer(PWideChar(WideString(Name))^, Temp);
new code work both in d2006 and d2009.
 
This:

Variables.Data = {0400000001000000060000003A494400301A050000000000000000000000}

Is never written by Delphi 2006. This is only written by Delphi 2009 to support the new string format. You cannot edit the same forms in Delphi 2006 and Delphi 2009. Once you migrate to Delphi 2009, you cannot go back with modified forms.
 
Back
Top