[V4MD] a second question about SQL and V4MD

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Mar 14 09:13:45 CST 2003


on 3/14/03 1:07 AM, Carsten Ilwig at Carsten.Ilwig at portal-rind.de wrote:

> Hi,
> I've got a new question about Valentina and SQL Commands using in Macromedias
> Director:
> 
> 1)
> How can I set a Field of type "kTypeDateTime" with an sql-command?
> If I write the following, I get an error 618 back (expected ','):
> insert into myTable (DateTimeOfChange) VALUES (12/12/2003 12/12/25)
> 
> also if I try this:
> insert into myTable (DateTimeOfChange) VALUES (12/12/2003 12:12:25)
> 
> How is the correct syntax to insert a time-value?

It must be in single quotes

    insert into myTable (DateTimeOfChange) VALUES ('12/12/2003 12:12:25')

> If I do the following
> insert into myTable (MemberID,DateTimeOfChange) VALUES (ID01254,NULL)
> 
> to set the field "DateTimeOfChange to NULL, the sqlExecute command in Director
> set the field on 00.00.2000 00:00:00
> 
> But in the SQL-Referenc-Doc stands following written:
> "If you need set a field to be NULL you should specify as value the key word
> NULL."

> Why does it works correct?
          ^^^^ NOT ?

I think this is because you have not assign flag Nullable for this field.

> 2)
> Is it possible to store an Director Member via SQLExecute command into an BLOB
> Field?

> With the SetMedia command in Director-Lingo ther isn't any problem to do this
> but if I try this with the INSERT INTO command I get als the error 618
> (expected ',') back.

Mmmm, I afraid this not works...

Command SetMedia is special for this.
Also we can "bind" media of Director to cursor...

So if you very need this, you can try build cursor

    curs = new Vcursors ...

Then bind your media to cursor fields

    curs.Bind...

Then fill fields of cursor and these director Memebers and do

    curs.AddRecord.


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list