The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 GetNumRows() behavior after database import
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

aplotnikov

Germany
169 Posts

Posted - 03/15/2017 :  11:58:13 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.6 SR3 64-bit
Operating System: Win 7 Pro SP1 64-bit

Hello,

I employ PutRecordset/ReadRecordset functions to import data from SQL databases - everything works fine. However if I try to get the worksheet row number by means Worksheet::GetNumRows function afterwards, it returns always the value of 30 if the number of rows is less than 30. Of course, the problem can be easily solved by means of Dataset::GetSize function, but I'm just curious, whether this limitation of GetNumRows is deliberate.

Regards,

Alexei

Edited by - aplotnikov on 03/15/2017 11:58:53 AM

cpyang

USA
1406 Posts

Posted - 03/15/2017 :  7:36:30 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Origin Worksheet GetNumRows is looking at the currently allocated space, and since each column can potentially have different number of values, you do need to look at individual column to get the actual size. So either Dataset GetSize, of get Column and call GetUpperBound.

CP
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000