General information
Category:
Coding, syntax & commands
>>I have a few things not working quiet the way I expected them to, and I was wondering if anyone else had a similar experience. I am using SQL 6.5 - These are the steps that I am following.
>>
>>handle = sqlconnect(..)
>>?sqlexec(handle,'use te') && returns 1
>>?cursorsetprop('fetchasneeded',.t.,0) && returns 1
>>?cursorsetprop('fetchsize',50,0) && returns .t.
>>
>>Now, If I query the database, it returns all of the records to the cursor, not the first 50 record as I requested. So, I added the following line before the query
>>
>>?sqlsetprop(handle,'asynchronous',.t.) && returns .t.
>>
>>Now, in order to get the data back, I have to run the query twice inorder to get the data to come back into the cursor. Am I doing something wrong? I don't think that you would need to run the query twice inorder to get my information. If you have any suggestions, or ideas, it would be greatly appriacated.
>>
>>Mike Knelsen
>
>Use CursorsetProp function to set MAXRECORDS property.
>Read Help CursorSetProp.
I tried this and had the following roblem....if I set MAXRECORDS to 50, it returns only 50 records. Without maxrecords, after the 50th record, it would get the next 50 records. So, is it safe to assume that I needed to do my SQL statement twice for everytime I do a new query to the database, or is there a way around this that will work better??
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only