Share via

Getting error while running code test function

Po, Raynon (admins) 20 Reputation points
2023-09-08T07:14:46.0066667+00:00

Getting error code while running Azure function:
Executing 'Functions.GetSomthingFromSQL' (Reason='This function was programmatically called via the host APIs.', Id=d89674e8-4952-43e2-b77f-57621395f326)

Result: Failure Exception: Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 18 for SQL Server' : file not found (0) (SQLDriverConnect)")

I was trying to use this code to access my Azure SQL via Azure function. Hitting this error when attempt to run the code.

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.

0 comments No comments

Answer accepted by question author

MayankBargali-MSFT 71,016 Reputation points Moderator
2023-09-08T11:05:39.8533333+00:00

@Po, Raynon (admins) Thanks for reaching out. You can try using the OBDC Driver 17. Sharing Previous discussion: https://stackoverflow.com/questions/75564548/cannot-connect-to-azure-sql-from-azure-functions https://github.com/Azure/azure-functions-python-worker/issues/664

In case if you still face the issue and you are running python function then I will suggest you to create the issue in this repro along with your code/runtime details so the experts can review it.

Please "Accept Answer" if the answer is helpful so that it can help others in the community.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.