You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rs.open "SELECT * FROM versionstext order by ID DESC LIMIT 1", dDatabaseConnection, adOpenKeyset, adLockOptimistic
debug.print rs.Fields(0).value ' works
debug.print rs.Fields("ID").value ' works
debug.print rs!msg ' too few arguments, expected 1 in call to 'item'
debug.print rs![msg] ' too few arguments, expected 1 in call to 'item'
Expected behavior
debug.print rs!msg should print the contents of the field msg. Fails with "too few arguments, expected 1 in call to 'item'"
debug.print rs![msg] should print the contents of the field msg. Fails with "too few arguments, expected 1 in call to 'item'"
Additional context
Unless im missing an external reference?
The text was updated successfully, but these errors were encountered:
Unfortunately that's another preview limitation --- the use of bang operator makes it a late-bound call to the members of the object, and the preview does not allow late-binding of the object.
Note that rs!msg is equivalent to rs.Fields("msg").Value but with the side effect that this has to go through the IDispatch.
Describe the bug
Open a database with ADODB - compiler doesnt allow the use of the "!" to grab a field name?
To Reproduce
Using Microsoft DAO 3.6 Object Library, with a connection string to MYSQL database ( driver={MySQL ODBC 5.1 Driver} )
Dim dDatabaseConnection = New ADODB.Connection
Dim rs As New ADODB.Recordset
dDatabaseConnection.ConnectionString =
dDatabaseConnection.CursorLocation = adUseClient
dDatabaseConnection.CommandTimeout = 60
dDatabaseConnection.open
rs.open "SELECT * FROM versionstext order by ID DESC LIMIT 1", dDatabaseConnection, adOpenKeyset, adLockOptimistic
debug.print rs.Fields(0).value ' works
debug.print rs.Fields("ID").value ' works
debug.print rs!msg ' too few arguments, expected 1 in call to 'item'
debug.print rs![msg] ' too few arguments, expected 1 in call to 'item'
Expected behavior
debug.print rs!msg should print the contents of the field msg. Fails with "too few arguments, expected 1 in call to 'item'"
debug.print rs![msg] should print the contents of the field msg. Fails with "too few arguments, expected 1 in call to 'item'"
Additional context
Unless im missing an external reference?
The text was updated successfully, but these errors were encountered: