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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
veluryram
New Member

cannot connect to odbc using DSN

I am trying to connect from PowerBI to a custom database that we have. We have developed an ODBC driver for our cutsom data source. I have created a DSN for our data source. The DSN  works fine from our ODBC test programs. Our ODBC driver is 32-bit, so I am using 32-bit Power BI (Version: 2.51.4885.701 32-bit (October 2017)).

 

But when I try to connect to it from Power BI, it reports that an error occurred whilte connecting. I am including the image of the error below. 

 

odbcerror.png

 

I have enabled ODBC trace. The trace doesn't show anything. I am including the contents of the trace below. It is not connecting to our driver.

 

Microsoft.Mashu 3c4c-36e8 ENTER SQLAllocHandle
SQLSMALLINT 1 <SQL_HANDLE_ENV>
SQLHANDLE 0x00000000
SQLHANDLE * 0x037CBE80

Microsoft.Mashu 3c4c-36e8 EXIT SQLAllocHandle with return code 0 (SQL_SUCCESS)
SQLSMALLINT 1 <SQL_HANDLE_ENV>
SQLHANDLE 0x00000000
SQLHANDLE * 0x037CBE80 ( 0x01A990C0)

Microsoft.Mashu 3c4c-36e8 ENTER SQLSetEnvAttr
SQLHENV 0x01A990C0
SQLINTEGER 200 <SQL_ATTR_ODBC_VERSION>
SQLPOINTER 3 <SQL_OV_ODBC3>
SQLINTEGER -6

Microsoft.Mashu 3c4c-36e8 EXIT SQLSetEnvAttr with return code 0 (SQL_SUCCESS)
SQLHENV 0x01A990C0
SQLINTEGER 200 <SQL_ATTR_ODBC_VERSION>
SQLPOINTER 3 <SQL_OV_ODBC3>
SQLINTEGER -6

Microsoft.Mashu 3c4c-36e8 ENTER SQLSetEnvAttr
SQLHENV 0x01A990C0
SQLINTEGER 201 <SQL_ATTR_CONNECTION_POOLING>
SQLPOINTER 2 <SQL_CP_ONE_PER_HENV>
SQLINTEGER -6

Microsoft.Mashu 3c4c-36e8 EXIT SQLSetEnvAttr with return code 0 (SQL_SUCCESS)
SQLHENV 0x01A990C0
SQLINTEGER 201 <SQL_ATTR_CONNECTION_POOLING>
SQLPOINTER 2 <SQL_CP_ONE_PER_HENV>
SQLINTEGER -6

PBIDesktop 5f3c-2348 ENTER SQLFreeHandle
SQLSMALLINT 1 <SQL_HANDLE_ENV>
SQLHANDLE 0x0ED9FC38

Microsoft.Mashu 3c4c-75e0 ENTER SQLFreeHandle
SQLSMALLINT 1 <SQL_HANDLE_ENV>
SQLHANDLE 0x01A990C0

PBIDesktop 5f3c-2348 EXIT SQLFreeHandle with return code 0 (SQL_SUCCESS)
SQLSMALLINT 1 <SQL_HANDLE_ENV>
SQLHANDLE 0x0ED9FC38

Microsoft.Mashu 3c4c-75e0 EXIT SQLFreeHandle with return code 0 (SQL_SUCCESS)
SQLSMALLINT 1 <SQL_HANDLE_ENV>
SQLHANDLE 0x01A990C0

 

I would appreciate any insight as  to what could be wrong. Is there any other PowerBI trace that would enable further diagnosis?

 

Thanks,

Ram

 

4 REPLIES 4
v-haibl-msft
Employee
Employee

@veluryram

 

Are you able to get data using this DSN in Excel - Get Data successfully?

 

Best Regards,
Herbert

I am able to get data into Excel successfully using the DSN after updating our ODBC driver. But I am still not able to connecto to the DSN through Power BI. The ODBC trace log doesn't show the call to SQLDriverConnectW() at all.

 

Any ideas in diagnosing the Power BI generic ODBC connector would be helpful.

 

Thanks,

Ram

@veluryram

 

If your issue persists in latest version 2.52.4921.581 (November 2017) of PBI Desktop, I suggest you to create a support ticket at http://support.powerbi.com (see bottom of page).

 

Support Ticket.gif

 

Best Regards,
Herbert

Herbert, thanks for the response.

 

I have treid to get into Excel using DSN. I couldn't retrieve the data. From the ODBC trace log, it appears that there is an ODBC interface function that hasn't been implemented in our driver. I will implement that function in our ODBC driver and see if I can retrieve the data.

 

Just to let you know, this is an ODBC driver we have developed for a custom analytical database of ours.  It works with a couple of other visual data analysis tools. We are trying to make it work with Power BI too. The problem is that with Power BI, I couldn't even get it to connect to our ODBC driver. With Excel, I can see from the ODBC log that our driver seems to be working fine except for the missing function I have mentioned above.

 

Thanks,

Ram

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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