Skip to content
Advertisement

textBox to DateTime in DB

Iam trying to get a DateTime out of an textBox, where it allready is in Format of MySql DateTime. The column in the DB is also DateTime format.

However, when i press my button to save the Dates in the DB, the whole row is gonna get emptyed.

I tried around with different formats und DataTypes in DB without anny effect

Button4 is the upload new data and the dataGridView part is filling the textBoxes with a preformated datetime that later get uploaded by button4

Advertisement

Answer

Allright, the by Jon Skeet suggested parametered sql request solved the problem.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement