Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1489

RC6+SQLite error: No such Field-Def

$
0
0
RC6 v6.0.015 + cairo_sqlite

I dont understand why i get the error "-2147221504 - No such Field-Def: id" when i access the existing column via RS("id").

How is this possible if i explicit select the id column with the sql statement and RS.RecordCount is larger than 0?

My code:

Code:

SQL = "SELECT id FROM files WHERE file = ?"
Set sCMD = connDBhash.CreateSelectCommand(SQL)
sCMD.SetText 1, sFile
Set RS = sCMD.Execute
If RS.RecordCount > 0 Then
  ID = RS("id")
end if


Viewing all articles
Browse latest Browse all 1489

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>