I have a procedure that can be changed dynamically by user for multi column and I write it in SQL when I run it. Everything is OK in SQL and Server Explorer in Visual Studio but when I want use it in …
Tag: c#
IsNullOrEmpty with an empty value still go into the loop
I’m currently trying to compare in C# a value I get from my database, and i use “IsNullOrEmpty” to check if the value is, well, null or empty. When the value in the database is “null”, no problem. …
How to update existing child class by using the parent id
Currently I have somes idea where we get the child data from its parent Id, and update the child data with hardcoded text. Parent Class: ` ` Child Class The situation is when the when i need to update all child status column to “Confirm”, i need to find it parent class first by search the rideId and if the
How to store code/programs written in any programming language in SQL Server
I have to display some C# code on a page of my web application (ASP.NET MVC application). How can i store C# code (program) in SQL Server ? Consider that i have the following code: public class …
What is the best way to add image and numerical data to the database at once?
I guess this should be straightforward. I have a table in SQL with the following columns: [CaseName],[Rev],[S1],[S2],[S3],[S1Im],[S2Imbef],[S2Imaft] the last three columns are images. I want to add …
SQL database error exception in c# using VS 2019 edition
I am new to C# database and I have been battling with this error for a few hours. When I created the table, I used ctrl + s to save it but it saved like normal saving into My Documents which I think …
What would be C# equivalent for SQL “>” operator in where clause for char column
working on an c# application i came across something that I don’t quite understand. I have SQL column KONTO char(15) and it contains numeric data. When I run the following query… I get this result… and thats just fine. My C# code providing the same result is: I came across problem when I tried to select where greater than “01”
Can you somehow overload the query in a method?
So there’s a Customer and a Seller and they’re both User. The only difference between them is that seller has a NameOfBusiness and customer does not. In the DAL I have this code: Is there a way to overload the query OR change the query so that you can fill in a NULL for NameOfBusiness? Answer Option A Do almost
Read table[columns] and display in console
I have one table and about 20 columns which contain more than 5000 rows. Right now I want to display all 20 columns in console, and I came to thirth column and I get error Here is my code: This peace of code make me error When I change this to Anyone can guide me and tell me what’s wrong
Multiline query execution
I am the Lead Developer on a web-based corporate tax payment application written in C#. My boss asked to develop a script to get him some relevant data from our application. Now he’s asked me to port it to a Desktop Application so he can run the script himself and not have to ask me for the report every time