Skip to main content

All Questions

Tagged with
1 vote
2 answers
94 views

Use @ literal in SQL command text

I want to change a password for a user in MySQL which requires @ symbol. However, C# SQL command uses that as a parameter holder and because of that the following command fails. command.CommandText = $...
Mensur's user avatar
  • 1,276
0 votes
1 answer
92 views

EF Core: Navigation property not loading related entities despite Include

I'm encountering an issue with Entity Framework Core where a navigation property is not being populated, even though I'm using the Include method. Relevant code: FileRepository: public IEnumerable<...
Tarek ElShennawy's user avatar
0 votes
1 answer
68 views

Fatal error encountered during command execution, i dont sure is command problem or connection

this is the code behind and now is the problem of while submit and update to sql have a problem. And i dont sure where the problem is it protected void Page_Load(object sender, EventArgs e) { ...
wengsiang ng's user avatar
0 votes
1 answer
178 views

Bulk update multiple records of multiple columns of multiple tables

I have multiple tables, for example TableA with columns AccountID, ColumnNameA1, ColumnNameA2, ColumnNameA3) TableB with columns AccountID, ColumnNameB1, ColumnNameB2, ColumnNameB3 TableC with ...
just_a_beginer's user avatar
1 vote
0 answers
58 views

How to check to see if a column is null or not in a database [duplicate]

I am trying to check my database to see if a user's member_hwid column is null or not. If it's null, then run the function to update the hwid. However, if the column is not null; then run the code to ...
The Guild Of ASMR's user avatar
1 vote
1 answer
367 views

How to mix a list and regular params in same query using Dapper

Given the following SQL statement for MySQL var sql = @"INSERT INTO MyTable (Key1, Field1, Field2, Field3) VALUES (@key, @field1, @field2, @field3) ON DUPLICATE UPDATE Field3 = @existing"; ...
Talon's user avatar
  • 3,583
0 votes
0 answers
179 views

Is this mysql connector for dotnet bug or my fault?

This is my code Conntction_String is Returned mysql connection info Table_Name string is Returned Table name From Tables This codes Select from table and Where active columns value is 1 mysql connect ...
prescott's user avatar
1 vote
2 answers
286 views

How To DEALLOCATE PREPARE Statement In C# Using Mysql.Data Client?

hope you guys are fine? OK.. i am using MySQL.Data client/library to access and use MySQL database. I was using happily it for sometimes on quite a few project. But suddenly facing a new issue that ...
SalmaBegum's user avatar
0 votes
1 answer
303 views

ASP.NET - Get the value of environment variables passed with docker

In my docker-compose.yaml, I'm setting environment variables to an api service with env_file: - db.env db.env MYSQL_DATABASE=db_name MYSQL_ROOT_PASSWORD=root MYSQL_USER=user MYSQL_PASSWORD=pass ...
Abristonks's user avatar
0 votes
3 answers
593 views

How to run multiple data readers on single my sql connection

MySqlConnection con = GetConnection(); string sql = "SELECT COUNT(ID) FROM booking WHERE DATE(Booking_Date) = CURDATE()"; string sql2 = "SELECT SUM(Fare) FROM ...
Umer Yaseen's user avatar
0 votes
0 answers
74 views

EntityFramework query

CREATE TABLE IF NOT EXISTS users ( UserId int auto_increment, RegisterId int, PRIMARY KEY(UserId) ); CREATE TABLE IF NOT EXISTS products ( ProductId int auto_increment, ...
lowdegeneration's user avatar
0 votes
0 answers
53 views

Xamarin App Keeps Freezing After Running MySql Query

Objective User enters a value in a simple textbox. This value is stored in a variable and is then passed as a parameter into an SQL query. The output of this query is the final result which needs to ...
anotherSTACKmember's user avatar
-4 votes
1 answer
35 views

Selecting specific User [closed]

I am trying to make an app that shows a users past expenses with C# querying a SQL Database. I have a program that shows the user their current expenses. They have to login using a unique username and ...
Joseph OConnell's user avatar
-1 votes
1 answer
39 views

funny characters in Sql String

I have a query string that works fine if tableStr is for example MSFT. However, if tableStr is BRK-B, the query fails. string query = "SELECT * FROM " + tableStr + " where DATE(Date)...
Ivan's user avatar
  • 7,658
0 votes
1 answer
53 views

Hashed and salted passwords are saved as random symbols in SQL database

Hashed and salted password look like this in the database: Is this how it is supposed to be? Because the hash and salt that i get in the backend look like this:
Henryy's user avatar
  • 25

15 30 50 per page
1
2 3 4 5
81