Skip to Content.
Sympa Menu

freetds - Re: ODBC's SQLSetStmtAttr

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: peter.restall AT bt.com
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Re: ODBC's SQLSetStmtAttr
  • Date: Tue, 28 May 2002 14:57:48 +0100


Yeah, I'd still fetch all of the data. But maybe I'd have to skip some
sometimes.

Personally I'd rather have the SQL engine do all the work, too...but in some
legacy systems' databases that we may not have physical access to, it may
not be possible to screen as many as possible out of the dataset (ie. an
extra field).

Just a shame I guess...but I can do without it I reckon.

We use VB here, but I've never been a Windoze man, so I'm trying to get a
few cross-platform libs working for myself/others; ODBC's needed 'cos we use
SQLserver :(

And PHP rocks btw...:)

Anyhow, thanks for your help...much appreciated. A decent, prompt
response...now there's something I've never gotten from the big M :) I love
free software...

Cheers,

Pete =:-)


Peter Restall
> businessAdvance
*Mail peter.restall AT bt.com
*Tel: + 44 (0) 1274 375087
*Fax: + 44 (0) 1274 730460

British Telecommunications plc
Registered office: 81 Newgate Street London EC1A 7AJ
Registered in England no. 1800000.

This electronic message contains information from British Telecommunications
plc which may be privileged or confidential. The information is intended to
be for the use of the individual(s) or entity named above. If you are not
the intended recipient be aware that any disclosure, copying, distribution
or use of the contents of this information is prohibited. If you have
received this electronic message in error, please notify us by telephone or
email (to the numbers or address above) immediately.


-----Original Message-----
From: James Cameron [mailto:james.cameron AT hp.com]
Sent: 28 May 2002 14:13
To: TDS Development Group
Subject: [freetds] Re: ODBC's SQLSetStmtAttr


On Tue, 2002-05-28 at 22:45, peter.restall AT bt.com wrote:
> Just thought scrollable cursors would be a nicety, as in
> int bob = db.records[100].fields(4);
> rather than sitting in a 'while()' loop iterating through one at a time.

But you'd still fetch all the data, right?

> What sort of design considerations do you have in mind ? In case it
doesn't
> stick out like a sore thumb, I'm pretty new to ODBC programming :)

No worries, I generally do PHP not ODBC. If I don't need all the data
from the query, then I improve the query depending on what I do need. I
give more of the work to the SQL engine. Either selecting fewer
columns, adding criteria to reduce the matched rows, or (depending on
the implementation) limiting to a specific number of returned rows.

If I do need all the data, then a while loop is usually fairly easy, in
most languages.

--
James Cameron (james.cameron AT hp.com)

http://quozl.linux.org.au/ (or) http://quozl.netrek.org/




Archive powered by MHonArc 2.6.24.

Top of Page