Skip to content

64 bit pragma functions #19

Description

@gburns53

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.

Activity

  1. gburns53 commented on Sep 24, 2025

    @gburns53
    Author

    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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions