Hi Martin,
how big is the database?
I am not expert on this topic, so I could only solve it in 2 ways:
#1
- Use silly statement like "SELECT * FROM Authors"
- Then something like:
[code=thinbasic]
...
DIM Row AS LONG
DIM UserName AS STRING
DO
OdbcFetch hStmt
IF ISTRUE(OdbcError) THEN EXIT DO
Row += 1
UserName = OdbcGetDataString(hStmt, 1)
IF UserName = what I seek THEN Return Row
LOOP
[/code]
... I guess it would take time for bigger DB.
#2
- Inject column with 1,2,3,... before executing the SELECT command
I am sorry, me and SQL ...
Petr
Bookmarks