Bug or something

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Bagieta
Posts: 21
Joined: Tue 09 Nov 2004 08:02
Location: Poland

Bug or something

Post by Bagieta » Wed 25 May 2005 18:07

I have strange problem while using Prepare statement.

I have a table

create table tab
(
Time datetime not null,
a uniqueidentifier not null
);

and call a statement:

select *
from tab
-- some comment
where a < :param

After calling prepare on that statement I can't work with database anymore.
This only happens if the table looks like that (datetime and uniqueidentifier). When columns are another type then it works fine.

The same thing is when there is no comment in sql statement.
Then it works ok.

But when a comment is befoer 'where' word then it crashes my database, and I cant work with it anymore.

Anyone had the same problem or resolved it?
Or maybe this is a bug?

Kind regards
Bagieta

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Fri 27 May 2005 12:09

We couldn't reproduce the problem.

From our point of view, compare guid on "greater" or "less" makes no sense. Possible, developers of MS SQL also haven't tested this ability.

Try to convert a field to CHAR using, for example CAST

Bagieta
Posts: 21
Joined: Tue 09 Nov 2004 08:02
Location: Poland

Post by Bagieta » Fri 27 May 2005 16:37

There is no connection with "greater" or "less" sing. There can also be a "=" sign.

To reproduce this situation try to use MSDE.
Create this table, execute or prepare that statement.
Then some error occurs. But it is ok.
The trouble is when you try to open another query. It gives you no records. The strange thing is that you can see the right columns but there are no data in the tables at all.
F.ex. try folowing query:
"select * from sysobjects"

I have no data in it after querying this problematic query.

This is not a big error for me but I only wanted to tell you that there is such a problem. Maybe in future you will meet something similar.

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Mon 30 May 2005 08:51

Thank you for information. But the error, it seems, is in the code of server.

Post Reply