Board index » delphi » more than one select clause and params in one query - Help

more than one select clause and params in one query - Help

Hi
I have 3 tired database and querys that look like this.

declare @today date
select @today = date(gedate())
declate @id int
select @id = :id

select * from home
where home.id = @id and
home.id in (select kodu.id from kodu where kodu.id = @id)
.....
MORE THAN ONE SELECT IN QUERY
The problem is that delphi does not get value(s) for parameter(s).
There is no problem with MSSQL 7.0 but for Adaptive Server Anywhere 7.0
and MSSQL 6.5 Delphi (Bde) does not allow it.

I can not change the client program, only server.

Marek

 

Re:more than one select clause and params in one query - Help


"Marek Sokk" <mas...@mail.com> wrote

Quote
> I have 3 tired database and querys that look like this.

> declare @today date
> select @today = date(gedate())
> declate @id int
> select @id = :id

> select * from home
> where home.id = @id and
> home.id in (select kodu.id from kodu where kodu.id = @id)
> .....
> MORE THAN ONE SELECT IN QUERY
> The problem is that delphi does not get value(s) for parameter(s).
> There is no problem with MSSQL 7.0 but for Adaptive Server Anywhere 7.0
> and MSSQL 6.5 Delphi (Bde) does not allow it.

Did you try using ExecSql, instead of Open? You are saying "get" parameter
values. But i dont see any *out* params? You can also use stored procedure
to do this.

-- Reddy Palle.

Other Threads