Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
marcobaciga
Helper I
Helper I

Custom Visual access ms sql server

Hi,

i want to create a custom visual for powerbi which connect a db ms sql server in localhost and extract the data.

I have found the "mssql" module for nodejs but it doesnt work because request another dependents module (events, promise, ecc)

The last build project return this mistake:

 

error  TYPESCRIPT  mssql/index.d.ts : (190,23) Cannot find name 'Promise'.
 error  TYPESCRIPT  mssql/index.d.ts : (192,21) Cannot find name 'Promise'.
 error  TYPESCRIPT mssql/index.d.ts : (243,40) Cannot find name 'Promise'.
 error  TYPESCRIPT  mssql/index.d.ts : (244,48) Cannot find name 'Promise'.
 error  TYPESCRIPT  mssql/index.d.ts : (249,25) Cannot find namespace 'NodeJS'.
 error  TYPESCRIPT mssql/index.d.ts : (249,49) Cannot find namespace 'NodeJS'.
 error  TYPESCRIPT  mssql/index.d.ts : (250,36) Cannot find name 'Promise'.
 error  TYPESCRIPT  mssql/index.d.ts : (251,44) Cannot find name 'Promise'.
 error  TYPESCRIPT mssql/index.d.ts : (254,34) Cannot find name 'Promise'.
 error  TYPESCRIPT  mssql/index.d.ts : (255,42) Cannot find name 'Promise'.
 error  TYPESCRIPT  mssql/index.d.ts : (258,32) Cannot find name 'Promise'.
 error  TYPESCRIPT  mssql/index.d.ts : (274,53) Cannot find name 'Promise'.
 error  TYPESCRIPT  mssql/index.d.ts : (276,22) Cannot find name 'Promise'.
 error  TYPESCRIPT  mssql/index.d.ts : (278,24) Cannot find name 'Promise'.
 error  TYPESCRIPT  mssql/index.d.ts : (300,41) Cannot find name 'Promise'.
 error  TYPESCRIPT mssql/index.d.ts : (302,37) Cannot find name 'Promise'.
 error  TYPESCRIPT  mssql/index.d.ts : (304,25) Cannot find name 'Promise'.
 error  TYPESCRIPT  promise/index.d.ts : (9,1) Declaration or statement expected.
 error  TYPESCRIPT  promise/index.d.ts : (9,8) Cannot find name 'as'.
 error  TYPESCRIPT promise/index.d.ts : (9,11) ';' expected.
 error  TYPESCRIPT promise/index.d.ts : (9,28) '{' expected.

 

Who can help me?

1 ACCEPTED SOLUTION

The module that you mentioned is for node.js only. I don't think that it might be used on client side.

If you wanto to use MS SQL server in your custom visual you should create an own backend server that connects to the sql server or use Active X but this way isn't secure.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

View solution in original post

4 REPLIES 4
v-viig
Community Champion
Community Champion

Hello @marcobaciga

 

Could you please share name of the module?

Please note that it would be better to use Power BI data import to connect to SQL Server and any other data-bases.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Hello @v-viig,

i want to connect a db sql in internal custom visual project because i have to update a field in my local database.

The idea is to run the command sql in my custom visual.

The module used is mssql  https://www.npmjs.com/package/mssql

 

 

Thank you

 

Marco

The module that you mentioned is for node.js only. I don't think that it might be used on client side.

If you wanto to use MS SQL server in your custom visual you should create an own backend server that connects to the sql server or use Active X but this way isn't secure.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

ok @v-viig,

Thank you

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors