Skip to content

SNOW-2146280: Connector returns an error when reading data from a DataReader #1189

Description

@StephenR1
  1. What version of .NET driver are you using?
    4.5.0

  2. What operating system and processor architecture are you using?
    Windows 10 x64

  3. What version of .NET framework are you using?
    .Net Core 8

  4. What did you do?

using (IDbConnection conn = new SnowflakeDbConnection())
{
conn.ConnectionString = connectionString;
conn.Open();

 IDbCommand cmd = conn.CreateCommand();
 cmd.CommandText = $"SELECT * FROM TVL.vw_SG_PULSESCORES WHERE tv_date = '{dataDate.ToString("yyyy-MM-dd")}'";
 IDataReader dr = cmd.ExecuteReader();
 while (dr.Read())
 {

All runs fine until dr.Read() where it hangs until I get a System.AggregateException: 'One or more errors occurred. (A task was canceled.)'

If I put a breakpoint in on the dr.Read() line I can see that the DataReader has been created as expected and the column details are all there.

If I run the query in a Snowflake workbook I see the rows returned (about 3000 rows returned in about 0.6s)
I also get the rows returned if I use the Snowflake ODBC driver.

  1. What did you expect to see?

I would expect a set of data rows to be returned for each iteration of the dr.Read()

  1. Can you set logging to DEBUG and collect the logs?

    Very oddly, I have turned on debug logging and the log files are being created where they should be but they are all empty?
    I tried TRACE logging as well as DEBUG but both had the same result.

Metadata

Metadata

Labels

questionIssue is a usage/other question rather than a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions