I want to use Data objects in my C#2022 Desktop application. I have spent weeks creating stored procedures in my SQL Server database.
I have spent a couple of days searching C# help files without finding a simple and complete explanation or example.
Any help would be greatly appreciated.
Jignesh KumarPosted Jan 19, 2024, 4:32 AM
Hello Edward,
Please find below n example for Datareader for get data from database,
Example for ExecutiveNonQuery for Insert, Update, Delete,
Please refer this link which will help you out,
https://www.c-sharpcorner.com/article/crud-operation-in-c-sharp-windows-application-using-store-procedure/
Anandu G NathPosted Jan 24, 2024, 6:51 AM
Refer beow link
https://dotnettutorials.net/lesson/ado-net-using-stored-procedure/
Asma KhalidPosted Jan 19, 2024, 12:22 PM
Check this out -> http://bit.ly/2tJqs9c
Muhammad Imran AnsariPosted Jan 19, 2024, 1:17 AM
Hi Edward,
In C#, you can call a SQL Server Stored Procedure using the SqlConnection class to establish a connection to the database and the SqlCommand class to execute the stored procedure. Here's a basic example:
Kindly refer to the link below for better comprehension or as a point of reference.
https://www.mssqltips.com/sqlservertip/5810/working-with-sql-server-stored-procedures-and-net/