Ok All it did was take some reading in to MSDN to find it
http://msdn.microsoft.com/library/psdk/indexsrv/ixrefobj_7kah.htm 

add this after myconnection.open
/*Max Records */
MyConnection.MaxRecords  = 10;

Haven't tested it yet as my catalog is reindexing.

Robert Everland III
Web Developer
Dixon Ticonderoga


-----Original Message-----
From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 26, 2001 11:28 AM
To: CF-Talk
Subject: RE: Index Server and setting maxRecords


> I recognise the problems of GETTING ALL the records and then USING SOME of
> them and had already tried the 'TOP n FROM' in the SQL statement but Index
> Server barfed it back - invalid syntax as it is expecting to find a column
> named 'TOP'

When you're using TOP, are you specifiying the column fields, or just using
"SELECT TOP 10 FROM" - this will confused SQL into thinking that the field
"TOP" must be returned

Can you try something like
SELECT TOP 10 *
FROM myTable

This should return just the top 10 rows in most flavors of SQL, but some
don't handle it

I use "TOP 1" an awful lot instead of "COUNT(*)" as this will return if
there are any rows in the table and is logarithmically faster than count on
large numbers of rows...

Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to