All Questions
1,213
questions
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 = $...
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<...
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)
{
...
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 ...
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 ...
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";
...
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 ...
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 ...
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
...
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 ...
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,
...
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 ...
-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 ...
-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)...
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: