cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rudra_deep Frequent Visitor
Frequent Visitor

ODBC: ERROR [42000] [SAP AG][LIBODBCHDC DLL][HDBODBC] Syntax error or access violation

Hello,

 

I am unable to connect to HANA using DirectQuery. it gives me following error message:

ODBC: ERROR [42000] [SAP AG][LIBODBCHDC DLL][HDBODBC] Syntax error or access violation;257 sql syntax error: incorrect syntax near "begin": line 3 col 8 (at pos 27) - (screenshot below)

Here is the first few line of the code:

do begin
DECLARE EventID INT=136;
DECLARE zoneminutes INT=0;
DECLARE EventStartDate NVARCHAR(50)='';

 

PS: I have full permissions to database I am tying to access here but somehow it does not work.

 

I am not sure if Power BI can call such type of queries. Any assistance would be of great help.

 

PBIERROR.jpg

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
rudra_deep Frequent Visitor
Frequent Visitor

Re: ODBC: ERROR [42000] [SAP AG][LIBODBCHDC DLL][HDBODBC] Syntax error or access violation

Hi @v-jiascu-msft, Thank you for your response.

I tried that but it didnt work out, so I created a function of the HANA query and have called the same function in the PowerQuery. It works flawlessly now.

 

2 REPLIES 2
v-jiascu-msft Super Contributor
Super Contributor

Re: ODBC: ERROR [42000] [SAP AG][LIBODBCHDC DLL][HDBODBC] Syntax error or access violation

Hi @rudra_deep,

 

Can you run the SQL statements in another tool of SAP HANA? Maybe you can try to store the procedure and call it directly in Power BI. 

 

Best Regards,

Dale

 

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
rudra_deep Frequent Visitor
Frequent Visitor

Re: ODBC: ERROR [42000] [SAP AG][LIBODBCHDC DLL][HDBODBC] Syntax error or access violation

Hi @v-jiascu-msft, Thank you for your response.

I tried that but it didnt work out, so I created a function of the HANA query and have called the same function in the PowerQuery. It works flawlessly now.

 

Helpful resources

Announcements
Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 328 members 3,840 guests
Please welcome our newest community members: