addRecord() returns VOID

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Sep 16 04:59:40 CDT 2008


On 9/16/08 12:14 PM, "Markus Fraefel" <markus.fraefel at futurestudios.ch>
wrote:

Hi Markus,

> I am a new user of Valentina 3 for Director (11). I managed to create a
> database with 2 tables in Valentina Studio: table_1 and table_2
> Now I want to add records to those tables with Lingo. I am using the
> following code:
>  
> table_1.setBlank(#forAdd)
> table_1.Field("name") = "hello table 1"
> newID = table_1.addRecord()
> put newID
>  
> The result with table_1 is an integer. So far so good. The record was
> created.
>  
> But if I am using the "same" code for table_2 in a handler called
> "makeRecordTable2" and call this handler directly:
>  
> table_2.setBlank(#forAdd)
> table_2.Field("name") = "hello table 2"
> newID = table_2.addRecord()
> put newID
>  
> The result from table_2 is VOID.
>  
> However, if I call the same handler "makeRecordTable2" directly after I
> created a record for table_1, the record will be created and the result is
> an integer.
>  
> This is very confusing. Why can I create a record for table_2 only if a
> record for table_1 was created immediately before?

Yes on first view looks strange.
I do not see mistakes.

I have CC to Kirill, he is going handle this issue.
Can you send him ZIP with db and this simple movie ?


Meanwhile do not miss SQL way.

NewID=db.SqlExecute( "INSERT INTO table_1(name) VALUES('hellow table 1')")
NewID=db.SqlExecute( "INSERT INTO table_2(name) VALUES('hellow table 2')")


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list