Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 help with select top n records
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

zinpin
Junior Member

Australia
202 Posts

Posted - 21 April 2005 :  03:30:16  Show Profile
Hi all is there a way to check and make sure that n number of records do exist when you run the "select top n ... "

The problem I'm facing right now is that when I run the select statement, and input the the result in an array with getrows and then try to access the array, I get the "Subscript out of range: [number:3]" error

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 21 April 2005 :  04:45:23  Show Profile  Send ruirib a Yahoo! Message
You can do a select count before and check whether the returned values is > 0.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

zinpin
Junior Member

Australia
202 Posts

Posted - 21 April 2005 :  05:47:39  Show Profile
Thanks rui i forgot about that one ;)
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 21 April 2005 :  06:13:02  Show Profile  Send ruirib a Yahoo! Message
You're welcome.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 24 April 2005 :  06:59:54  Show Profile  Visit Gremlin's Homepage
why not just check the bounds of your getrows array, don't really need to do another query

NumRows = ubound(GetRowsArray,2)
NumCols = ubound(GetRowsArray,1)

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

zinpin
Junior Member

Australia
202 Posts

Posted - 25 April 2005 :  02:01:50  Show Profile
Thanks Grem :) Oh and apologies for our PMs behavior regarding Anzac day !

Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 25 April 2005 :  09:34:56  Show Profile  Visit Gremlin's Homepage
quote:
Originally posted by zinpin

Thanks Grem :) Oh and apologies for our PMs behavior regarding Anzac day !




heh, yeah well you know what they say, can't keep an aussie away from a free BBQ now can ya :)

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.19 seconds. Powered By: Snitz Forums 2000 Version 3.4.07