SL-Pirate / dart_odbc

A Dart package for interacting with ODBC databases. It allows you to connect to ODBC data sources and execute SQL queries directly from your Dart applications.
MIT License
5 stars 2 forks source link

is there a way to know if its connected to dsn? #2

Closed J0313-1806 closed 4 months ago

J0313-1806 commented 4 months ago

odbc.connect return void, so i dont know, if its connected to the dsn or not. I have provided dsn, db, username and password field and yet the executive command is returning empty list, and also how to know if the driver we are using is the correct one? I have sage 50 set up on my pc that uses odbc.

SL-Pirate commented 4 months ago

odbc.connect return void

That means you are connected. If the connection fails it will throw an exception

how to know if the driver we are using is the correct one?

That's a hard one. You will actually have to refer the vendor's documentation to check which driver file to use.

According to what you are describing it could be an issue with the driver or the installation of the driver. One of the users reported a similar issue with oracle and reinstalling the driver fixed the issue for him.

Edit: Actually no. His correct driver didn't work due to an issue in the installation but when he tried wrong drivers they got connected but the queries returned empty responses

J0313-1806 commented 4 months ago

Thanks for the reply, couldnt solve it so just made a microservice that fetches tables from db using odbc in golang https://github.com/J0313-1806/odbc_go

SL-Pirate commented 4 months ago

Aight. I'm sorry it didn't work put for you