Page 1 of 1

Open only a part of the recordset

PostPosted: Fri Jan 16, 2015 10:26 am
by stu
Hi there!

I'm working with an SQL Server db with several tables way over the 200K records. Problem I'm experiencing is that the dbpOpenTable's are taking forever for this particular record sets... is there a way of opening a portion of the tables only and get info on demand...

Sort of a SELECT TOP 10 PERCENT (?)

Cheers.

Re: Open only a part of the recordset

PostPosted: Fri Jan 16, 2015 11:27 am
by Neosoft Support
Yes, you can use the dbpExecSQL action to open the table instead. For example, the following will open the table Contacts and display the first 50 records:

dbpExecSQL "AddrBook" "SELECT TOP 50 * FROM Contacts" ""

Re: Open only a part of the recordset

PostPosted: Fri Jan 16, 2015 11:45 am
by stu
Neosoft Support wrote:Yes, you can use the dbpExecSQL action to open the table instead. For example, the following will open the table Contacts and display the first 50 records:

dbpExecSQL "AddrBook" "SELECT TOP 50 * FROM Contacts" ""


That's brilliant! Had no idea I could skip using dbpOpentable and go straight with execsql...

Just made my day! Thanks Dave!