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
I can query using sql statements like: "select * from pragma_database_list" This works in 32-bit Excel distribution. However this gives me a 'table does not exist' in 64 bit version. It seems most pragma/schema functions can work with a query in 32, but not in 64. In this case I need to see what db's the user has open. Is there a reason for this?
Also, I'm probably missing something fundamentally obvious .. but why in the 64 bit version do you comment out loadlibrary for SQLite3_StdCall.dll This wrapper is not needed at all for 64 bit?
I noticed this on Sqlite.org documentation so I included in case it provides clue:
Note: These pragmas are only available in builds using non-standard compile-time options.
Solved: You can send the command through as "Pragma database_list" in the sql
Public Function SQLite3PrepareV2(ByVal dbHandle As LongPtr, ByVal sql As String, ByRef stmtHandle As LongPtr) As Long
SQLite3PrepareV2 = sqlite3_prepare16_v2(dbHandle, StrPtr(sql), Len(sql) * 2, stmtHandle, 0)
End Function
I'm leaving this thread the behavior between 64 bit and 32 bit is unique. I prefer 32 bit as with a sql statement you can control what what is returned. "select name from pragma_database_list where rowid = 1"
Activity
gburns53 commentedon Sep 24, 2025
Solved: You can send the command through as "Pragma database_list" in the sql
Public Function SQLite3PrepareV2(ByVal dbHandle As LongPtr, ByVal sql As String, ByRef stmtHandle As LongPtr) As Long
SQLite3PrepareV2 = sqlite3_prepare16_v2(dbHandle, StrPtr(sql), Len(sql) * 2, stmtHandle, 0)
End Function
I'm leaving this thread the behavior between 64 bit and 32 bit is unique. I prefer 32 bit as with a sql statement you can control what what is returned. "select name from pragma_database_list where rowid = 1"