[V4MD] Question about the SQLExecute Command

Carsten Ilwig Carsten.Ilwig at Portal-RIND.de
Fri Mar 14 10:17:40 CST 2003


Hi Ruslan,
>Mistake is that if you want SELECT then you need use
>     curs = new VCursor( db, "SELECT ... ")
> Command Sqlexecute() is for execution all rest SQL commands like INSERT,
> UPDATE
Ok, I undestand this.
But in the SQL-Reference doc, no hint is to the fact that one can use the
SQL-Commando only in combination with a cursor. That's the reasen, why I
tried it with the SQLExecute-command.

>  insert into myTable (DateTimeOfChange) VALUES ('12/12/2003 12:12:25')
That works fine. :-)

>> 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
>I think this is because you have not assign flag Nullable for this field.
That's right. But now I have set the Flag and it does not work yet
correctly.
The result in V4MD is still the same:
00.00.2000 00:00:00
If I do this in visql, it works fine. The field is NULL. Only in V4MD it
won't work correct.


>> 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.
That's correct, when I do this with the SetMedia-command, than it work's
fine.
But I have tried to insert a hole Director Member with the SQL-Command
"insert into" via SQLExecute-command.
But this do not seem to function.

for example:
    insert into myTable (TextMember) VALUE ('(member 71 of castLib 9)').

I get now error back, but in the field "TextMember" there are no data saved
and the field is also not NULL.

Is it not to be possibly to write Directormember (or generally data for
BLOB-fields) with the SQL commands Insert/update in a database?

Thanks for your answer
Carsten




More information about the Valentina mailing list