Forum Discussion

manandhu's avatar
manandhu
New Member
9 months ago
Solved

How to Save Custom Connector Credential/Connections into a Local Database(Read/Write) in PowerQuery

Hi everyone,

I’m developing a Power BI custom connector using Power Query SDK and I need to store the user’s connection configurations (Service URL, Username, Password, Connection Notes, etc.) inside a local database so that the connector can:

  1. Read existing saved connections, and

  2. Write new connections into the database.

So far, I can read data from the database using Odbc.Query, but I’m running into issues when trying to INSERT or UPDATE records. It seems that Power Query doesn’t execute non-SELECT statements normally through ODBC, especially with SQLite.

My questions:

  • What is the correct or recommended way to write to a local database from a custom connector?

  • Are there any built-in or default mechanisms in Power Query SDK for persisting user-created connections?

  • Has anyone successfully implemented read/write logic (INSERT/UPDATE/DELETE) inside a custom connector?

  • If so, could you please share a sample implementation?

I want to build behavior similar to “Add Connection” → save into DB → show in navigation list.

Any guidance, best practices, or example code would be greatly appreciated!

Thanks!

3 Replies