Relative Content

Tag Archive for c#sql

How to optimize iterating through multiple SQL queries in C#

I have a program that pulls data for the efficiency of operators in a factory. The current process for doing this is to start by pulling the operators for the day we are looking and store it in a list. We then iterate through that list and pull the necessary info by querying our DB. The run time for this is currently fairly long and I am trying to optimize it but I am unsure of the best approach. Here are some example of the process:

Single query multiple for list items C#

I have a List of people I need to get report data for. Is there a way I can query the database one time to grab the report data for all people in the list instead of querying x amount of times in a for each loop? Or is looping the only way

Understanding the Purpose of a SubItem in ListView

I’m a newbie trying to make an Windows Form App via Visual Studio.
I am trying to read data from my SQL Server’s database and display this on a table in the Forms App.
I’m using ListView for this.

How to insert Excel records into SQL Server from C# Datagridview

Good afternoon community. I am trying to log data from excel to sql using c# datagridview, but excel has a certain format. I attach my excel of my data and see if you can guide me to be able to register them. enter image description here I tried to add these records in my sql […]