Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dbsetprop fetchsize not running even set to -1

Status
Not open for further replies.

dickylam

IS-IT--Management
Jun 24, 2001
86
I have a table in sql database's table which contains around 31,000 rows (records).

I use SQL passthrough method to access the table and use SQLVIEW to load all records.

create sql view temp_view remote connection zodbcname as "select * from ztable"

select 0
use temp_view

= dbsetprop('&zclaritylist_view','view','fetchsize',-1)

However, only 1,100 records returned.

I checked the maxrecords is also -1 (which is all results).

I do not know really what happen is it and I feel better I use ado API to read record.

Please advise.
 
Dickylam,

What back end are you using? If it is SQL Server, check its ROWCOUNT property.

Also try running the same query using SQL Pass-Through:

lnConn = SQLCONNECT("zodbcname")
SQLEXEC(lnConn,"SELECT * FROM ztable","temp_cursor")
SELECT temp_cursor
BROWSE


If that doesn't solve it, try sending this:

SQLEXEC(lnConn,"SET ROWCOUNT 0")

Do that just before the other SQLEXEC() above.

Let us know the result.

Also, be aware that the process will take a long time. You will see the Browse straight away, but it might take many seconds for the last record to come across.

Mike


Mike Lewis
Edinburgh, Scotland
 
Thank You.

I use the first method. But I would like to know the cursor return will be a table or remote view ?

If it is a table, will it create under the current opened databse ? If I do not create under the current opened databse, how can I do ?

Thanks.
 
The result of the SQLEXEC command will be a temporary cursor.

It will not belong to the current database, but unlike a free table it will support long field names.

it may show up in the GETENV("TEMP") directory with a random filename, but as soon as the cursor is closed (with "USE") the temp file will go away.
 
Thank You.

I will use the first method to replace my existing SQL Remote View calling.

 
Mikelewis

Yes, It works. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top