ODBC connection to MS SQL 2000 help needed

Jan Schenkel janschenkel at yahoo.com
Sun Apr 2 03:29:58 EDT 2006


--- Mark Wieder <mwieder at ahsoftware.net> wrote:
> Jan-
> 
> Friday, March 31, 2006, 11:04:56 PM, you wrote:
> 
> > 4) On a similar note, add a 'revdb_fieldnames()'
> > function that returns a list of the fields in a
> table
> > for a given database connection
> 
> ...as in revDatabaseColumnNames?
> 

No, revdb_columnnames and its alias function
revDatabaseColumnNames work on a record set, so they
help you with cursors of queries you've already
executed.
revdb_fieldnames(tConnectionID,tTableName) would give
us the names of fields for a table we haven't queried
yet.

The way I solve it right now, is to query the database
with:
  SELECT * FROM <TheTableName>
and append TOP or LIMIT clauses for databases that
support this.
Then I can use revdb_columnnames to fetch the
information and then call revdb_closecursor without
having read any of the data.
But this is a waste of resources on less-efficient
databases, as they would prep the entire data set.

Hence my request for more metadata information.

> But basically amen to everything Jan said.
> 
> Jan - can you write up a BZ enhancement request for
> these? The rev
> team tends to forget about things otherwise.
> 
> -- 
> -Mark Wieder
>

It is now available as bugzilla #3479 for your voting
pleasures.

Jan Schenkel.

Quartam Reports for Revolution
<http://www.quartam.com>

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the use-livecode mailing list