List Info

Thread: problem in select command




problem in select command
country flaguser name
United States
2007-08-17 02:46:12

Thanks alot for your guidances .
Unfortunately none of the solutions affected. In fact the sql command doesn't return any result without where cluase too and after executing this line : item:=AdoQuery1.ExecSQL;
the following error appears:
"project project1.exe raised exception class EOleError with message 'Variant does not reference an automation object'.process stoppe.Use Step or Run to continue. "
the source code is as following:
day := 'SELECT * FROM checks ';
AdoQuery1.Close;
AdoQuery1.SQL.Clear;
AdoQuery1.SQL.Add(day);
ADOQuery1.Active:=true;
item:=AdoQuery1.ExecSQL;

---------------------------------
Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool.

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___
Re: problem in select command
country flaguser name
United States
2007-08-17 04:51:32

Good Morning!

Change item:=AdoQuery1.ExecSQL;
to item:=AdoQuery1.Open;

Cya...Dan'l

--- sara-arian < aban4009%40yahoo.com">aban4009yahoo.com> wrote:

> Thanks alot for your guidances .
> Unfortunately none of the solutions affected. In
> fact the sql command doesn't return any result
&gt; without where cluase too and after executing this
>; line : item:=AdoQuery1.ExecSQL;
> the following error appears:
> "project project1.exe raised exception class
&gt; EOleError with message 'Variant does not reference
> an automation object'.process stoppe.Use Step or Run
> to continue. "
&gt; the source code is as following:
> day := 'SELECT * FROM checks ';
> AdoQuery1.Close;
&gt; AdoQuery1.SQL.Clear;
> AdoQuery1.SQL.Add(day);
> ADOQuery1.Active:=true;
> item:=AdoQuery1.ExecSQL;
>
>
> ---------------------------------
> Choose the right car based on your needs. Check out
> Yahoo! Autos new Car Finder tool.
&gt;
> [Non-text portions of this message have been
>; removed]
>
>

____________________________________
Every day is a Great day, but
some days are GREATER than others!

__________________________________________________________
Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool.
http://autos.yahoo.com/carfinder/

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )