On Wed, Jul 7, 2021 at 6:11 AM Yoni Eilon <[email protected]> wrote:

> We use Sequel to query Snowflake from Ruby code using the ruby-odbc gem.
>
> When there is a problem with the query in Snowflake, we don't get back an
> understandable error from the Sequel, but just a general ODBC error, with
> something that looks like an  SQLSTATE code.
>
> For example, when I run this query on Snowflake, trying to query a non
> existent table named "bla":
>
> *res = conn.fetch("select * from bla").all*
> I get back this error:
> *Sequel::DatabaseError (ODBC::Error: 4 (2003) S)*
>
> Instead of:
> "*Object 'BLA' does not exist or not authorized*"
>
> We're using:
> Sequel gem - 5.38.0
> ruby-odbc gem - version 0.99999
> Snowflake ODBC driver - version 2.21.6
> Ruby - version 2.6.6
>
> Any help would be highly appreciated.
>

I'm guessing you get that error because the ODBC driver uses "4 (2003) S"
as the exception message.  Not much Sequel can do in this case.  If you
want this fixed, you'll probably need to fix the ODBC driver.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/CADGZSSeGPozVSF9N3UiYdanNvRwq0gR2dXxMg-cffhS-csMAcA%40mail.gmail.com.

Reply via email to