Page 1 of 1

TUniQuery only returns 1 row

Posted: Wed 21 Aug 2013 21:03
by kstantonnw
Greetings.

I just purchased UniDAC to work with an ODBC driver for the AS/400 replacing the current BDE connection and query components.

In a very simple test app, I use the same exact SQL but TUniQuery only returns 1 row.

Environment:
Windows XP all updates
Delphi 6 all updates
UniDAC 5.02


Here is the SQL, very basic:
SELECT CRORDR, CRAMT, CRCUST, CRMDAT, CRRDAT, "CRAR$", CRPOST,
CRPDAT
FROM ARREC Arrec

Here is the TUniQuery:

object qry: TUniQuery
Connection = UniConnection1
Transaction = UniTransaction1
UpdateTransaction = UniTransaction1
SQL.Strings = (
'SELECT CRORDR, CRAMT, CRCUST, CRMDAT, CRRDAT, "CRAR$", CRPOST, '
'CRPDAT'
'FROM ARREC Arrec')
FetchRows = 100
Left = 88
Top = 16
end


Connection Component:
object UniConnection1: TUniConnection
ProviderName = 'ODBC'
SpecificOptions.Strings = (
'ODBC.DSNType=ntName')
DefaultTransaction = UniTransaction1
Username = 'KEVIN40'
Password = '**************'
Server = 'FCTG400'
ConnectDialog = UniConnectDialog1
LoginPrompt = False
Left = 24
Top = 16
end


Transaction Component:
object UniTransaction1: TUniTransaction
DefaultConnection = UniConnection1
Left = 56
Top = 16
end

Any help will be GREATLY appreciated!

Kevin

Re: TUniQuery only returns 1 row

Posted: Thu 22 Aug 2013 09:18
by AlexP
Hello,

Please specify the exact versions of the DB server and ODBC driver you are using.

Re: TUniQuery only returns 1 row

Posted: Thu 22 Aug 2013 15:40
by kstantonnw
The database resides on an IBM AS/400.

ODBC Driver: Client Access Driver (32-bit)
This is part of the installation for IBM i Access for Windows 7.1.

I hope this helps!

Kevin

Re: TUniQuery only returns 1 row

Posted: Fri 23 Aug 2013 10:25
by AlexP
Hello,

Please specify the name and the versions of the server you are working with

Re: TUniQuery only returns 1 row

Posted: Fri 23 Aug 2013 12:47
by kstantonnw
I'm not sure where to get that.

I'm assuming by "server" you're referring to the AS/400?

Re: TUniQuery only returns 1 row

Posted: Fri 23 Aug 2013 13:29
by AlexP
Hello,

I meant DB server

Re: TUniQuery only returns 1 row

Posted: Tue 27 Aug 2013 21:09
by kstantonnw
Greetings,

Sorry for the delayed reply. I have found an alternative route that worked the first time out of the box.

Best Regards,
Kevin

Re: TUniQuery only returns 1 row

Posted: Wed 28 Aug 2013 09:31
by AlexP
Hello,

If you have any other questions, feel free to contact us.

Re: TUniQuery only returns 1 row

Posted: Fri 20 Dec 2013 18:28
by jstone
I am having the same problem with my iSeries (AS/400) I'm only getting 1 row for my query. I would really appreciate any help I can get on this.

Thanks
Jody

Re: TUniQuery only returns 1 row

Posted: Fri 20 Dec 2013 18:53
by jstone
If you set prefetch=0 in your DSN string it seems to fetch all the rows.

Re: TUniQuery only returns 1 row

Posted: Mon 23 Dec 2013 11:03
by AlexP
Hello,

Please specify your ODBC driver version. We have checked the behavior on the version 10.01.200.238 and, independently on the value set in the prefetch parameter, UniDAC returns the correct number of strings.
P.S. There is no such parameter as prefetch in the ODBC settings of the driver version I have specified, we pasted this parameter directly to the connection string.

Re: TUniQuery only returns 1 row

Posted: Tue 24 Dec 2013 13:52
by jstone
Version 13.00.01.00

Re: TUniQuery only returns 1 row

Posted: Thu 02 Jan 2014 10:25
by AlexP
Hello,

Please send us a link, where we can download the specified version of the driver to study the issue.

Re: TUniQuery only returns 1 row

Posted: Mon 03 Mar 2014 14:47
by Andidreas
jstone wrote:If you set prefetch=0 in your DSN string it seems to fetch all the rows.
@jstone...
Where can i find this Parameter?
I've tried to add this parameter to the Connection String for my AS400, but i've got an Exception that this parameter doesn't exists/is allowed!

Re: TUniQuery only returns 1 row

Posted: Wed 05 Mar 2014 11:41
by AlexP
This parameter is set in ODBC Data Source Administrator when creating DSN