V4RB: VException??

Claudius Sailer claudius.sailer at me.com
Tue May 4 01:38:16 CDT 2010


Hi Ivan,

 
Am Dienstag 04 Mai 2010 um 08:25AM schrieb "Ivan Smahin" <ivan_smahin at paradigmasoft.com>:
>Hello Claudius,
>
>Monday, May 3, 2010, 11:29:10 PM, you wrote:
>
>> Hello,
>
>> I have following Code
>
>
>>   SQLString="SELECT RecID,Online FROM Currencies"
>>   CurEx=V4RBSQLSelect(tmpDB,SQLString)
>>   Ende=CurEx.RecordCount
>>   
>>   //Links korrigieren in Currencies
>>   cmd="ALTER TABLE Currencies MODIFY COLUMN Online OBJECTPTR
>> CONSTRAINT Currencies_Online__Online REFERENCES Online ON DELETE RESTRICT"
>>   count=V4RBSQLExecute(tmpDB,cmd)
>>   
>
>... REFERENCES Online ...
>
>I  believe  there  is just a table named "Online" along with the field
>Currencies.Online - yes?
>
>
>Tell  me  please  also  - what do you want to change in plain english.
>Because  currently we are going to allow altering of ObjectPtr without
>zeroing   the   data  only  if  you change some properties which don'e
>affect referential properties. NUllable, field or link name and so on.
>But if you want to alter ObjectPtr to refer another table you will get
>an empty values anyway.

Okay I tried following....

I create an VCursor (CurEx) with the RecID and the value of the ObjectPtr-field of the table Currencies. The ObjectPtrField is linked to table Online. Then I fix my problem with links without names and tried to Update table Currencies with the records stored in VCursor CurEx. The coding failed with VException at step CurEx.Position=i.
After this problem I rewrote the complete coding like this. I create VCursor (CurEx) same way, I transfer CurEx to an RB-Array, I alter table I update table with informations from RB-Array. Everything works fine.

So for me it seems that Alter tale destroyed VCursor CurEx, because after Alter table CurEx was not long able to read.

BUT, when you fix the problem in Valentina by keeping values in ObjectPtr when I alter table only the naming of the link, this would be great and I will wait for this. Coding all in RB is much more complicate as I thought ;-))

bye


Claudiu


More information about the Valentina mailing list