Skip to content
Advertisement

Tag: c#

C# invalid column name problem but is different from others

Hello i have a table called Card_tbl with a cell CardID. The problem is that when i insert only numbers like 12345 they are uploaded in the database, but when i use mix letters like Q1234R it will say INVALID COLUMN NAME Q1234R I tried many things to fix it but no success. THE CELL IS ON VARCHAR(50) this is

Cascading combo box

I am trying to bind 2 combo box, being the value of the second dependent from de first. All the solutions that i saw to this problem were by the use of Sql.Data (Datatable), which i cant use, due to the architecture of the application. I can do it 2 ways, by c# or through ASP Object Data Source. I’ve

In c# app, how to connect foreign key of subtask table in SQL?

I am trying to create a Task Management System using C# Web API & SQL Server. Here is what I am trying to achieve: Users can send POST requests to create a Task (with optional sub-tasks). Users can send GET requests to retrieve a Task (displaying all sub-tasks in the response if they exist) Here are some of my current

C# select SQL query with parameter

I would like to migrate database from MS Access to SQL Server and I’m trying to modify my SQL queries. In MS Access they worked. I have this C# code: Connection method : SQL query is working but not returning rows. I guess that problem is a syntax of parameter in query. Can someone direct me? Answer You must not

Executing a StoredProcedure in Dotnetcore3.1

I created a Stored Procedure by Selecting values from 2 different tables. Now the problem I have is to execute and read the result data from my dotnetcore 3.1 code. I am not sure if the code I have written is correct. I am using IQueryable<AppUser> but, The SP contains a mix of AppUser and CourseMarks. So can I represent

Having weird exception using MAX(CASE WHEN) in query: DB2.iSeries.iDB2DCFunctionErrorException: ‘An unexpected exception occurred

I have the following query to put some data from rows in columns: But when I try to run it in the following code: I get this exception: “IBM.Data.DB2.iSeries.iDB2DCFunctionErrorException: ‘An unexpected exception occurred. Type: System.AccessViolationException, Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt..'” I have other queries that work just

Advertisement