Board index » delphi » TBetterADODataSet and error "Invalid variant operation"

TBetterADODataSet and error "Invalid variant operation"

Hi,

I'm trying the TBetterADODataSet and have the following situation:
the BetterADODataSet1-component is connected to MSSQL7-Server, the
commandtext contains a 'SELECT * FROM VIEW1' where VIEW1 is defined like
'SELECT * FROM MYTABLE WHERE ID_USER=(SELECT ID_USER FROM PROCESSID WHERE
ID_PROCESS=@@SPID)'. (PROCESSID is a table updated on login, so I can filter
the records the user will see). The Active=true works without problems; when
modifying some data in the Grid (Woll2Woll-infopower) and posting the record
I receive a 'Invalid variant operation'-error.
Doing the same with a TADODataSet-component or a TADOQuery-component all
works fine.

Where do I mistake?

Thanks

Anton Santa

 

Re:TBetterADODataSet and error "Invalid variant operation"


Hi Anton (and Vassil)
I just got the same error after upgrading 2.05 -> 2.15

It seems like it hates checking VarIsNull on empty fields, so after changing
it back to:
Line 519:
        If (
             (Not VarIsEmpty(Data))And //08.MAR.2001 VarIsEmpty changed to
VarIsNull -- No reversed again
             (
Line 529:
           ( //08.MAR.2001
             VarIsEmpty(Data)And
             (Not VarIsEmpty(oField.Value))And

the problem disappears.
However, these changes must have reintroduced the former error (which i
don't know and hasn't harmed me before).

Kind regards (and thanks for a SUPER product)
Rene Pape

"Anton Santa" <sa...@sabesoft.it> skrev i en meddelelse
news:3ab64f64$1_1@dnews...

Quote
> Hi,

> I'm trying the TBetterADODataSet and have the following situation:
> the BetterADODataSet1-component is connected to MSSQL7-Server, the
> commandtext contains a 'SELECT * FROM VIEW1' where VIEW1 is defined like
> 'SELECT * FROM MYTABLE WHERE ID_USER=(SELECT ID_USER FROM PROCESSID WHERE
> ID_PROCESS=@@SPID)'. (PROCESSID is a table updated on login, so I can
filter
> the records the user will see). The Active=true works without problems;
when
> modifying some data in the Grid (Woll2Woll-infopower) and posting the
record
> I receive a 'Invalid variant operation'-error.
> Doing the same with a TADODataSet-component or a TADOQuery-component all
> works fine.

> Where do I mistake?

> Thanks

> Anton Santa

Re:TBetterADODataSet and error "Invalid variant operation"


Quote
> ... the problem disappears.
> However, these changes must have reintroduced the former error (which i
> don't know and hasn't harmed me before).

I have fixed both the current and the former error in version 2.16.
http://web.orbitel.bg/vassil/

Thanks for reporting.

--
Vassil Nazarov
IT Manager, Sofia Cable SA

Re:TBetterADODataSet and error "Invalid variant operation"


Many thanks!
Have a nice day and weekend.

Anton Santa
SABE SOFT

"Vassil Nazarov" <vas...@mail.orbitel.bg> ha scritto nel messaggio
news:3ab9ae7d_1@dnews...

Quote
> ... the problem disappears.
> However, these changes must have reintroduced the former error (which i
> don't know and hasn't harmed me before).

I have fixed both the current and the former error in version 2.16.
http://web.orbitel.bg/vassil/

Thanks for reporting.

--
Vassil Nazarov
IT Manager, Sofia Cable SA

Other Threads