JuliaDatabases / ODBC.jl

An ODBC interface for the Julia programming language
https://odbc.juliadatabases.org/stable
Other
106 stars 63 forks source link

Struct ODBCError #234

Closed ErwanPiR closed 4 years ago

ErwanPiR commented 5 years ago

Hi,

I have a problem with the return type ODBCError. My point is that when you run ODBC.DSN(...), you have either a DSN type or a ODBCError in the case something went wrong. In that last case, you just have a string. It would be nice to know which error cause the sql_error. Is there a way to have more information about the error for example to use in a try catch statement (without having to parse the string...) ? Is it possible to add the error type from the sql to get more information of what went wrong ?

ERROR: ODBC.ODBCError("API.SQLDriverConnect(dbc, window_handle, conn_string, out_conn.ptr, BUFLEN, out_buff, driver_prompt) failed; return code: -1 => SQL_ERROR")

Thanks a lot,

Erwan

quinnj commented 4 years ago

We can only print whatever the dbms odbc driver or driver manager share in terms of errors.