-1

I am trying to get test by using snowflake jdbc .I connected . but when I try to get some data from snowflake I got this error.net.snowflake.client.jdbc.SnowflakeLoggedFeatureNotSupportedException. I asked the snowflake support they said you are using rs.beforeFirst() method .snowflake driver doesn't support that. Anyone Know how to fix that [enter image description here](https://i.stack.imgur.com/DuNQi.png)

I expected like get column get some data .I think I should try without rs.beforeFirst() method to create db_util class please if anyone know .help me

Aykut.Koc
  • 1
  • 2
  • Can you explain why do you need to reset result set pointer? Do you iterate result set multiple times? Maybe it's better to extract data from results set into some variable and iterate it instead? – Darius Zi Apr 17 '23 at 06:10
  • Please don't post code images or errors if possible, copy your code or code error into question with block code format: https://stackoverflow.com/help/how-to-ask – borchvm Apr 17 '23 at 06:21
  • [Please do not upload images of code/data/errors.](//meta.stackoverflow.com/q/285551) Instead, edit your question to include the code as properly formatted text. – seenukarthi Apr 17 '23 at 07:04

1 Answers1

0

According to the javadocs for ResultSet::beforeFirst():

"Throws: SQLFeatureNotSupportedException - if the JDBC driver does not support this method."

It appears that the Snowflake JDBC driver doesn't support the method. And their support have confirmed that.

You asked:

Anyone know how to fix that?

You cannot fix it.

Apparently, it is not possible to reset a Snowflake cursor.

I guess you could close the ResultSet and repeat the query. It is inelegant, and potentially inefficient, but if you need to do it ...

If that approach won't work for you, you will need to find and use a different database product whose JDBC driver does provide a way to reset its cursors.

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216