All Questions
12,737
questions
1
vote
0
answers
32
views
How to calculate Running balance in RDLC reports?
I have an application that uses C#, Entity framework core & MySql database for tracking income & expense and i'm using RDLC for reporting.
I have a transactions table for tracking income and ...
0
votes
0
answers
48
views
Connect Timeout expired. Unable to connect to any of the specified MySQL hosts
I'm trying to deploy my api inside a docker container. It was working perfectly but I changed the mysql server parameters and it started giving me the following problem. Does anyone have any idea what ...
0
votes
1
answer
62
views
Is it possible to combine parameterised update statements?
I have a large number of similar but unique update statements, where the same fields are being updated with different values, ie.
UPDATE tbl SET field1 = "x" WHERE pk = 1;
UPDATE tbl SET ...
-3
votes
0
answers
88
views
Where I've got problem in connection between program and data base?
In my program, I first load the form with mysql login. When I enter the incorrect login and password, it works fine, it doesn't allow me to go any further. When I enter the correct login and password.....
0
votes
0
answers
34
views
.Net 8 XUnit: Mocking MySql connection and different service implementation for unit testing
I'm working on a .Net 8 API and I'm currently creating tests, and my concern is about mocking the connection to the MySql database.
We use CQRS (Mediator pattern) and in the queries handler (what I ...
0
votes
0
answers
23
views
Facing an issue to convert timestamp to date in MySqlX.XDevAPI
I am trying to convert TimeStamp to Date format for easier comparisons to fetch records from my
MySqlX db but when I try to query it like this
DbDoc docData = new DbDoc(new { _startDate = startDate....
0
votes
1
answer
56
views
How to select distinct items from table by a variable and then join another table in LINQ
I have a query where I need to select distinct order numbers from a table of orders. An order number can correspond to multiple entries in the table of orders but I only want distinct orders. I.E. I ...
0
votes
0
answers
61
views
Wrong Time deduction from ToQueryString EF MySql
What is the result of ToQueryString when we have time deduction?
TimeSpan t = TimeSpan.FromHours(10); var query = context.table1.Where(x => x.Status == 3 && x.CreatedAt < DateTime.Now - ...
0
votes
0
answers
35
views
How to get value from mySQL db with two key criteria [duplicate]
I need to update a field in a mySQL db where the row is identified with two key criteria. Here is what works using a single criterion:
cmd.CommandText = $"UPDATE `" + tableName + "` SET ...
1
vote
0
answers
43
views
How to Optimize Bulk Insert of Related Records in Entity Framework Core Without Using EFCore.BulkExtensions?
I am working on a project where I need to insert a large number of related records into multiple tables using Entity Framework Core. The insertion process involves at least three tables: Question, ...
0
votes
0
answers
22
views
1064 when try to mysqldump [duplicate]
There is a problem, when I try to create a dump file inside my C# project, it just give 1064 error no matter how do my code looks like...
public class MySQLBackup
{
private string ...
1
vote
1
answer
50
views
keep getting error when executing raw sql in .net and mysql
I'm using EFCore 7.0 and Pomelo 7.0 with MySQL 8.0. When I execute raw SQL in NetCore project, it has error. This is a working way in previous version.
The code is:
var cnt = context.Database.SqlQuery&...
0
votes
0
answers
58
views
How to debug Serilog to MySQL connection issues?
I'm new to Serilog and SO and I'm trying to use Serilog to log into a MySql 5.7 database.
I'm getting this error from the MySql server, for which I couldn't find any help online:
Aborted connection 23 ...
1
vote
1
answer
115
views
C# form with MySQL, DataGridView
There is any way to make this C# form DataGridView with MySQL, setup more simpler? In this example project i 'm using a myDB database person table to fill the DataGridView, and handling CRUD methods.
...
0
votes
0
answers
19
views
I want to connect to a database in Visual Studio using MySql.Data
I try to connect to a database using MySql.Data but it doesn't work. What did i do wrong?
private List<Car> cars;
private MySqlConnection conn;
private static ...