Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
120 views

I constructed a MySqlParameter with MySqlParameter tmp1 = new MySqlParameter("?tmp1", 0.0); and when executing the corresponding insert query received the error message that the respective column ...
Bernhard Hiller's user avatar
1 vote
2 answers
380 views

I have this method, which I have in the base class that helps me to select anything from the children classes and also to reduce code repetition. The problem is when I call it I get an error which is ...
user3560798's user avatar
0 votes
0 answers
553 views

I've been looking for an answer to my question, but i cannot find it, so here it is: Between String.Format and MySql Parameters, what is the best practice in terms of creating a query for the ...
João Reis's user avatar
1 vote
1 answer
148 views

i have this code: using (MySql.Data.MySqlClient.MySqlConnection cn = new MySql.Data.MySqlClient.MySqlConnection( Properties.Settings.Default.CONNNConnectionString)) { ...
Boubaker Bousbia Brahim's user avatar
5 votes
3 answers
4k views

I'm adding a parameter to be called with a MySQL stored procedure like List<MySqlParameter> MyParams = new List<MySqlParameter>(); MyParams.Add(new MySqlParameter("MyId", 0)); But for ...
neildt's user avatar
  • 5,403
4 votes
1 answer
2k views

My problem is when using C# and MySQL database to save some records by sending parameters. Although i have already set the charset as Utf-8 and i can see the unicode characters correctly, the problem ...
Kypros's user avatar
  • 2,986
0 votes
1 answer
794 views

I am trying to have a function that can search for an item (in this case, a motherboard) in a database when given parameters, but I want to be able to get all motherboards if no parameters are given. ...
Madeline's user avatar
  • 645
2 votes
1 answer
3k views

I want to use MySqlParameter to pass tableName into query (to prevent slq injections) MySqlCommand cmd = new MySqlCommand("select * from @table"), cn) cmd.Parameters.AddWithValue("@table",TableName); ...
Stecya's user avatar
  • 23.3k
22 votes
10 answers
22k views

I have this question about the MySqlParameter from the .NET connector. I have this query: SELECT * FROM table WHERE id IN (@parameter) And the MySqlParameter is: intArray = new List<int>(){1,...
Phoenix_uy's user avatar
  • 3,304
0 votes
1 answer
4k views

I'm trying to do a basic insert statement using a parameterized query. My problem is whatever the syntax I'm using it seems like the query is being done with all parameters set to null instead of ...
Ben's user avatar
  • 3
0 votes
1 answer
3k views

I have a mysqlcommand and mysqlparameter array [] MySqlParameter[] param = new MySqlParameter[]{ // params here }; Now I want to set the command parameter for this array. How I can do ...
anirudha's user avatar
2 votes
1 answer
2k views

According to MySql in this document C.7.9.6. Changes in MySQL Connector/NET 5.0.5 (07 March 2007): Added MySqlParameterCollection.AddWithValue and marked the Add(name, value) method as obsolete. I'...
JYelton's user avatar
  • 36.6k
0 votes
2 answers
3k views

I have created a method that will insert any exceptions thrown into a table on "ExceptionLog" on MySql server. ExceptionLog Table format idExceptionLog int (AI) User (varchar 45) ...
Steve's user avatar
  • 225
5 votes
2 answers
3k views

i was wondering, can a parameter be used more then once in the same query, like this : MySqlParameter oPar0 = new MySqlParameter("e164", MySqlDbType.String); oPar0.Value = user.E164; string sSQL0 = "...
Terry's user avatar
  • 5,312
9 votes
8 answers
14k views

My idea is to create some generic classes for Insert/Update/Select via a C# (3.5) Winforms app talking with a MySQL database via MySQL .NET Connector 6.2.2. For example: public void Insert(string ...
John M's user avatar
  • 14.7k
1 vote
1 answer
791 views

I am using in C# MYsql .I have query that works if I run on MySql Workbench ,but in C# it does not return any value also does not give ant error too.There is only one different using on Mysql I use ...
Ercan's user avatar
  • 2,773
6 votes
1 answer
11k views

(int) faultsGroup is 0 or 1 but i always get this error: Column 'FaultGroup' cannot be null Does anyone tell me why? Syntax looks ok. MySqlCommand cmdAdd = new MySqlCommand("INSERT INTO Faults (" + ...
senzacionale's user avatar
2 votes
3 answers
1k views

I have a table in a MySql database that stores user accounts. One of the columns, expires, stores an expiration date but defaults to NULL. I need to be able to remove an expiration date and set it ...
Adam Lassek's user avatar
  • 35.5k