ODBC connection to MS SQL 2000 help needed
janschenkel at yahoo.com
Thu Mar 30 12:34:50 EST 2006
--- mfstuart at cox.net wrote:
> Hi all,
> Problem is, the select returns no data (when I know
> there is data) and the Counter = -1 for Matching
> Ive tried with and without the semicolon ; in the
> on mouseUp for the Select button.
> Heres the select statement:
> SELECT account_number as "Account No", account_name
> as "Account Name" FROM account;
> Any help will be much appreciated, thanx.
There's nothiong worng with your SELECT query ; the
problem is in the ODBC database driver not always
returning the correct record count. I've seen this
with Access and Progress databases as well.
Hopefully, the next revision opf the database drivers
will improve on this problem. The easiest workaround
for now is to traverse the record set until
revdb_iseof() returns true.
repeat until revdb_iseof(tCursorID)
## do something with the data in the currentrecord
Unfortunately, some databases only support read-only
forward-only cursors -- so you should traverse the
record set and fetch all the data you want in one go.
Hope this helped,
Quartam Reports for Revolution
"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
More information about the Use-livecode