BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

I can't do nested datasets with sqlserver

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress)
View previous topic :: View next topic  
Author Message
Ernesto Cullen
Guest





PostPosted: Sat Aug 28, 2004 11:27 pm    Post subject: I can't do nested datasets with sqlserver Reply with quote



Hi all,
I have the following problem: I put a SQLConnection, connect to
Northwind database in SQLServer 2000 (same in SQLServer 7). Next I put a
SQLDataset (same with SQLQuery) with the sentence

select * from orders

and another SQLDataset with

select * from [order details]
where OrderID=:OrderID

then I put a Datasource referencing SQLDataset1, and select the
datasource in SQLDataset2 (property Datasource). I thought that second
dataset would take the parameter from the field with the same name in
SQLDataset1. But I only get a message

SQL Server error: SQL State: HY000, SQL Error Code: 0 (null)

I can't get through that. As a result, I am unable to work with nested
datasets...

I guess this have to do with a problem with parameters i have posted
before (no answers): sometimes, many times but not always, i am unable
to open a query like

select * from table where id=:aParam

where Table is a valid table and id is the name of the primary key field.

Does anybody have experienced the same problem? I can't believe i am the
only one using parameters with sqlserver!

P.S: both problems get away using Core Labs' driver (trial)...

Thanks in advance

Ernesto Cullen
Back to top
Jan Doggen
Guest





PostPosted: Mon Aug 30, 2004 8:57 am    Post subject: Re: I can't do nested datasets with sqlserver Reply with quote



Hello Ernesto

1) Use the database form wizard in Delphi to set up a master/detail
relationship, then compare your code with the code generated by the wizard
(its under File/New/Other/Business)
2) Do you use the latest DBExpress MSSQL driver (there has been an update)?
3) What Delphi versions?

Bye
Jan

"Ernesto Cullen" <ecullen (AT) ciudad (DOT) com.ar> wrote

Quote:
Hi all,
I have the following problem: I put a SQLConnection, connect to
Northwind database in SQLServer 2000 (same in SQLServer 7). Next I put a
SQLDataset (same with SQLQuery) with the sentence

select * from orders

and another SQLDataset with

select * from [order details]
where OrderID=:OrderID

then I put a Datasource referencing SQLDataset1, and select the
datasource in SQLDataset2 (property Datasource). I thought that second
dataset would take the parameter from the field with the same name in
SQLDataset1. But I only get a message

SQL Server error: SQL State: HY000, SQL Error Code: 0 (null)

I can't get through that. As a result, I am unable to work with nested
datasets...

I guess this have to do with a problem with parameters i have posted
before (no answers): sometimes, many times but not always, i am unable
to open a query like

select * from table where id=:aParam

where Table is a valid table and id is the name of the primary key field.

Does anybody have experienced the same problem? I can't believe i am the
only one using parameters with sqlserver!

P.S: both problems get away using Core Labs' driver (trial)...

Thanks in advance

Ernesto Cullen



Back to top
Jan Doggen
Guest





PostPosted: Mon Aug 30, 2004 9:16 am    Post subject: Re: I can't do nested datasets with sqlserver Reply with quote



Hi Ernesto

Additional:
- The full error message you get (I think) adds "invalid input parameter
message". Please supply full error messages.
- Search for this in Borland newsgroup

http://www.google.com/groups?as_q=master%20detail&as_epq=invalid%20input%20p
arameter%20values&safe=images&ie=ISO-8859-1&as_ugroup=borland.public.delphi.
database.*&lr=&num=50&hl=en

This points you to Quality Central. Search for HY000
This leads to entrie 3689

Good luck in bug hunting
Jan

"Ernesto Cullen" <ecullen (AT) ciudad (DOT) com.ar> wrote

Quote:
Hi all,
I have the following problem: I put a SQLConnection, connect to
Northwind database in SQLServer 2000 (same in SQLServer 7). Next I put a
SQLDataset (same with SQLQuery) with the sentence

select * from orders

and another SQLDataset with

select * from [order details]
where OrderID=:OrderID

then I put a Datasource referencing SQLDataset1, and select the
datasource in SQLDataset2 (property Datasource). I thought that second
dataset would take the parameter from the field with the same name in
SQLDataset1. But I only get a message

SQL Server error: SQL State: HY000, SQL Error Code: 0 (null)

I can't get through that. As a result, I am unable to work with nested
datasets...

I guess this have to do with a problem with parameters i have posted
before (no answers): sometimes, many times but not always, i am unable
to open a query like

select * from table where id=:aParam

where Table is a valid table and id is the name of the primary key field.

Does anybody have experienced the same problem? I can't believe i am the
only one using parameters with sqlserver!

P.S: both problems get away using Core Labs' driver (trial)...

Thanks in advance

Ernesto Cullen



Back to top
Ernesto Cullen
Guest





PostPosted: Mon Aug 30, 2004 12:48 pm    Post subject: Re: I can't do nested datasets with sqlserver Reply with quote

Thanks for the reply. I have found an entry in QC (#3689) talking about
the error with a single query (not nested), which I have found too. And
a comment from Ramesh Theivendran says that it is a MS bug (case
#SRX030738605044) and they are inventigating for a workaround. Later I
found another Ramesh post where he says the error is addressed in D8
driver, and there are plans to port the fix back to D7... the question
is 'when'.
This error (mainly the one-table error) is causing me a lot of trouble,
and I can't wait to Borland. I'll swith to CoreLabs driver

Thanks for your attention Jan

Ernesto Cullen


Jan Doggen wrote:
Quote:
Hi Ernesto

Additional:
- The full error message you get (I think) adds "invalid input parameter
message". Please supply full error messages.
- Search for this in Borland newsgroup

http://www.google.com/groups?as_q=master%20detail&as_epq=invalid%20input%20p
arameter%20values&safe=images&ie=ISO-8859-1&as_ugroup=borland.public.delphi.
database.*&lr=&num=50&hl=en

This points you to Quality Central. Search for HY000
This leads to entrie 3689

Good luck in bug hunting
Jan

"Ernesto Cullen" <ecullen (AT) ciudad (DOT) com.ar> wrote in message
news:41311513 (AT) newsgroups (DOT) borland.com...

Hi all,
I have the following problem: I put a SQLConnection, connect to
Northwind database in SQLServer 2000 (same in SQLServer 7). Next I put a
SQLDataset (same with SQLQuery) with the sentence

select * from orders

and another SQLDataset with

select * from [order details]
where OrderID=:OrderID

then I put a Datasource referencing SQLDataset1, and select the
datasource in SQLDataset2 (property Datasource). I thought that second
dataset would take the parameter from the field with the same name in
SQLDataset1. But I only get a message

SQL Server error: SQL State: HY000, SQL Error Code: 0 (null)

I can't get through that. As a result, I am unable to work with nested
datasets...

I guess this have to do with a problem with parameters i have posted
before (no answers): sometimes, many times but not always, i am unable
to open a query like

select * from table where id=:aParam

where Table is a valid table and id is the name of the primary key field.

Does anybody have experienced the same problem? I can't believe i am the
only one using parameters with sqlserver!

P.S: both problems get away using Core Labs' driver (trial)...

Thanks in advance

Ernesto Cullen




Back to top
Bill Todd (TeamB)
Guest





PostPosted: Mon Aug 30, 2004 1:39 pm    Post subject: Re: I can't do nested datasets with sqlserver Reply with quote

Did you try the new driver on Ramesh's page on Code Central?

--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.