Updating method text

jda jda at his.com
Sat Jul 25 15:30:14 CDT 2009


On Jul 25, 2009, at 10:37 AM, Ruslan Zasukhin wrote:

> Hi
>
> You can do this rename via API CALL
> fld.name = thepage
>
> You can still use SQL Just use "" around PAGES
>

Thanks.

You told me before I could leave the field "pages" and just make sure  
to perform searches using the name [pages]. This works, and it's a lot  
simpler then updating the schema.

But existing dbs have methods that refer to "pages". Before I open old  
dbs, I try to change the methodText, which was

       "left(pages, 32)"

to

       vdb.Table("thereferences").Field("pages").MethodText =  
"left([pages], 32)"

The problem is that when I open the old db

     vdb = new VDatabase
     vdb.open(f)

I get a warning

		��M e t h o d   c o m p i l a t i o n   f a i l e d   -     :   
 l e f t ( p a g e s ,   3 2 ) 


and the update is aborted and methodText is not updated. So when I  
next open the db I see this warning

                 Exception catched during read of system tables.
                   :   F i e l d   
 " p a g e s S o r t M e t h o d " ,   a t t r i b u t e   
 " M e t h o d T e x t "   i s   n o t   m a t c h e d   w i t h   
 s c h e m a - s t o r e d   a t t r i b u t e . 

I can't change the method text because Valentina chokes on the text of  
the method in the old db.

How can I avoid this, update old databases with the new method text,  
and avoid generating warnings every time I open the database?

Thanks,

Jon


More information about the Valentina mailing list