Questions tagged [system.data.sqlclient]

34 questions
0
votes
1 answer

How to check if Invalid Operation, Error connection is closed is fixed in System.Data.SqlClient

During high load, our app randomly throw this error: System.Data.SqlClient.SqlConnection.GetOpenTdsConnection outerType System.AggregateException outerMessage A Task's exception(s) were not observed either by Waiting on the Task or accessing its…
daxu
  • 3,514
  • 5
  • 38
  • 76
0
votes
1 answer

Error parsing connection string with AAD user credentials

On Azure account, I have created an AAD user. I created Azure SQL database and assigned the newly created AAD user as a Server administrator. The server has both AAD account login and SQL Server login. I tested connecting to server through SSMS…
0
votes
1 answer

Connection string for SqlClient/OLEDB driver like jdbc:jtds driver?

I am working on .NET6 WebApi project on Ubuntu/Windows and the connection to the SQL Server DB is configured to use windows authentication. On windows I can use this connection string Data Source=DB-Name;Initial Catalog=Cat1;Integrated…
0
votes
1 answer

Serilog WPF based app works but not when installed as an EXE

Note: This is a problem with Microsoft.Data.SqlClient and it's implementation of SqlConnection. If I create an instance (_sqlConnection = new SqlConnection(); ) then check state ( _sqlConnection.State) I get a NullReferenceException. If I assign a…
0
votes
0 answers

System.Data.SqlClient packagereference does not flow between project references

I can't get System.Data.SqlClient to flow over my project references even though one of the projects is dependent of it. SqlClientDependent project .csproj: ProjectReference to SqlClientDependent project: When i build SqlClientDependent project the…
Easten
  • 37
  • 8
0
votes
0 answers

Violation of PRIMARY KEY constraint 'PK_SES'. Cannot insert duplicate key in object 'dbo.SES'. The duplicate key value is (456785)

I am a beginner in C#. So please help me with this issue. Exception thrown: 'System.Data.SqlClient.SqlException' in System.Data.SqlClient.dll An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.SqlClient.dll…
Zass
  • 19
  • 2
0
votes
1 answer

Exception thrown: 'System.Data.SqlClient.SqlException' in System.Data.SqlClient.dll

I'm a beginner, and new to C#, I don't know how to fix this bug, please help SQL Service is running, VS2019 is updated to the newest and I am Windows 10. It only said Exception thrown: 'System.Data.SqlClient.SqlException' in System.Data.dll Here's…
Zass
  • 19
  • 2
0
votes
1 answer

Calling class library I get the error system.data.sqlclient is not supported on this platform

Here is the setup when I am getting this error: Project "main" based on Core 3.1 and of type console application. Does not have a reference to System.Data.SqlClient and does not need one. It calls project "process" also based on Core 3.1 of type…
0
votes
0 answers

App_name as system.data.sqlclient

I am getting system.data.sqlclient as app_name in my database through my dot net application. Which application is connecting through system.data.sqlclient application name.
R R
  • 1
0
votes
2 answers

Exception thrown: 'System.Data.SqlClient.SqlException' in System.Data.dll In VS2019

Im a beginner, and new to C#, i don't know how to fix this bug, please help SQL Service is running, VS2019 is updated to newest and i am Windows 11. It only said Exception thrown: 'System.Data.SqlClient.SqlException' in System.Data.dll Code: string…
0
votes
1 answer

System.Data.SqlClient.SqlException: 'Invalid column name 'P1000'.'

Can anybody help me? Why am I getting this error? If I remove the 'P' from the prod_id which left only number, it can work but if I add alphabet, it says "Invalid column name". I already added .ToString() to it, but why it still can't take varchar…
taegord
  • 1
  • 1
0
votes
0 answers

Python.NET - Trying to execute a stored procedure in SQL Server

All, I am hoping someone can assist me with trying to get a stored procedure to run using IronPython and CLR. All I am trying to do is get the below stored procedure to run. When it runs and gets to the ExecuteNonQuery line, it jumps to the…
0
votes
0 answers

ExecuteNonQuery Violation of Primary Key after putting value?

I'm trying to write a CRUD app and I have a problem with the Create method. Program is crashing with error System.Data.SqlClient.SqlException: 'Violation of PRIMARY KEY constraint 'PK_Pracownicy'. Cannot insert duplicate key in object…
mikeyMike
  • 21
  • 4
0
votes
0 answers

in T-SQL which error severity level, if any, lets the statement continue but causes SqlClient library to display a message

I am not clear about T-SQL error severity levels as they relate to the System.Data.SqlClient library in .NET client applications. [bolded for emphasis in response to close-vote suggestion that I clarify how an answer about what severity levels…
Tim
  • 8,669
  • 31
  • 105
  • 183
0
votes
1 answer

"sni.dll" not found while using System.Data.SqlClient using Azure C#

I'm trying to run a SELECT query from my sql server through an Azure Function App so I can later work on the data pulled from it. I'm fairly new to Azure so I might be missing something. My Runtime version is ~3. It's a C# HTTP Trigger Function. My…
Al P
  • 1
  • 2