Why is my C# code not updating the database record and row not select properly?
I am working on a C# application on Adding Admin to the database. I can select a data row from a grid, and the details of the selected row are displayed in textboxes for editing. However, when I change the textboxes and click the “Update” button, I receive the error message: “Select a record to update” even though I have already selected a row and the details are displayed correctly in the form. My SQL server works properly.
Parameter values in SQL statement are ignored in C# code
If have the following peace of C# code to write rows from a DataTable to my SQL table.
Can’t connect to Database in Server
i finally received a Server to store my DB.
I opened my DB in the server, from there everything is working.
SQL Server best export import option of selected range of records [closed]
Closed 2 days ago.
Updating data in tables linked by a foreign key
I have 2 tables:
Define constraint to prevent values outside the smalldatetime range from being inserted into a DataTable (C#)
I have a CSV file with different values. I have loaded these values into a DataTable, which has the same structure as a table in SQL, with the difference that the table in SQL has smalldatetime fields and those of the DataTable are of type DateTime. The structure of the DataTable is created dynamically according to certain user requirements.
Once the data has been loaded into the DataTable, I perform a SqlBulkCopy to copy the data from the DataTable to the table in SQL, but the process aborts (DataTable SmallDateTime overflow) because some values that exist in the DataTable are not in the range “1/1/ 1900 12:00:00 AM and 6/6/2079 11:59:59 PM”
C++ MSSQL query returns string like “MMMMMMMMMMMMMMMMMMMMMMMMM” if field in DB is NULL
I am creating a c++ program to work with a mssql database. I connect to the base with the code described in this video https://www.youtube.com/watch?v=1g_Xng_uH2w&t=835s. However, I encountered one problem. When the database field is NULL in the query response I get one big string of something that looks like “MMMMMMMMMMMMMMMMMMMMMM”. Can anyone tell me how I can change this. The best option is for my request to return NULL.
Executing stored procedure from C# fails with linked server but works in SSMS
We are using C# to execute a stored procedure where this stored procedure uses EXECUTE AS
to call data from a linked server.
How can I stop one instance of SQL Server 2019 Express LocalDB?
I am developing a Windows program, using C# and VS 2022. This program is linked to a .mdf
database file, and everything works fine in development.
How can I stop one instance of SQL Server Express LocalDB 2019?
I am developing a Windows program, using C# and VS 2022. This program is linked to an .mdf database and everything works fine in development.