Click here to Skip to main content
15,888,527 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# Mysql query problem Pin
nighttrain_19-Jul-11 3:35
nighttrain_19-Jul-11 3:35 
AnswerRe: C# Mysql query problem [modified] Pin
BobJanova19-Jul-11 3:56
BobJanova19-Jul-11 3:56 
GeneralRe: C# Mysql query problem Pin
PIEBALDconsult19-Jul-11 14:22
mvePIEBALDconsult19-Jul-11 14:22 
GeneralRe: C# Mysql query problem Pin
BobJanova20-Jul-11 11:19
BobJanova20-Jul-11 11:19 
GeneralRe: C# Mysql query problem Pin
PIEBALDconsult20-Jul-11 14:18
mvePIEBALDconsult20-Jul-11 14:18 
GeneralRe: C# Mysql query problem Pin
BobJanova21-Jul-11 7:02
BobJanova21-Jul-11 7:02 
GeneralRe: C# Mysql query problem Pin
sugais19-Jul-11 20:51
sugais19-Jul-11 20:51 
GeneralRe: C# Mysql query problem [modified] Pin
nighttrain_20-Jul-11 5:43
nighttrain_20-Jul-11 5:43 
i tried to use a new two parameters:
m_insert_cmd2.Parameters.Add("@DateStart", MySqlDbType.DateTime).Value = this.dateTimePicker1.Text;
m_insert_cmd2.Parameters.Add("@DateEnd", MySqlDbType.DateTime).Value = this.dateTimePicker2.Text;

and tried like this:
m_insert_cmd2.Parameters.Add("@DateStart", MySqlDbType.DateTime).Value = this.dateTimePicker1.Text.ToString();
m_insert_cmd2.Parameters.Add("@DateEnd", MySqlDbType.DateTime).Value = this.dateTimePicker2.Text.ToString();

the same problem is communicat:
String was not recognized as a valid DateTime.

my full query look like:
m_insert_cmd2 = new MySqlCommand("INSERT INTO tb_rezerwacja (kwota, ilosc_osob, w_tym_ilosc_dzieci, data_od, data_do, FK_pokoj_id, FK_zamowienie_id) VALUES (' 345', '3', '3', @DateStart, @DateEnd,  @pokoj_id,  @zamowienie_id)", m_conn);


on form i add 2 dateTimepickers like u see and in MySQL database the date fields are in Date format...

modified on Wednesday, July 20, 2011 3:00 PM

GeneralRe: C# Mysql query problem Pin
nighttrain_21-Jul-11 21:26
nighttrain_21-Jul-11 21:26 
QuestionHow to Finding Solutions Pin
Anubhava Dimri18-Jul-11 21:35
Anubhava Dimri18-Jul-11 21:35 
AnswerRe: How to Finding Solutions Pin
Blue_Boy18-Jul-11 22:02
Blue_Boy18-Jul-11 22:02 
GeneralRe: How to Finding Solutions Pin
Anubhava Dimri18-Jul-11 23:33
Anubhava Dimri18-Jul-11 23:33 
GeneralRe: How to Finding Solutions Pin
Blue_Boy18-Jul-11 23:36
Blue_Boy18-Jul-11 23:36 
GeneralRe: How to Finding Solutions Pin
Anubhava Dimri19-Jul-11 1:21
Anubhava Dimri19-Jul-11 1:21 
GeneralRe: How to Finding Solutions Pin
HTT9019-Jul-11 2:18
HTT9019-Jul-11 2:18 
AnswerRe: How to Finding Solutions Pin
BobJanova18-Jul-11 22:10
BobJanova18-Jul-11 22:10 
AnswerRe: How to Finding Solutions Pin
Estys18-Jul-11 22:32
Estys18-Jul-11 22:32 
GeneralRe: How to Finding Solutions Pin
Anubhava Dimri18-Jul-11 23:26
Anubhava Dimri18-Jul-11 23:26 
GeneralRe: How to Finding Solutions Pin
Estys18-Jul-11 23:43
Estys18-Jul-11 23:43 
GeneralRe: How to Finding Solutions Pin
Blue_Boy19-Jul-11 1:07
Blue_Boy19-Jul-11 1:07 
JokeRe: How to Finding Solutions Pin
Estys19-Jul-11 1:44
Estys19-Jul-11 1:44 
GeneralRe: How to Finding Solutions Pin
BobJanova19-Jul-11 1:21
BobJanova19-Jul-11 1:21 
GeneralRe: How to Finding Solutions Pin
Estys19-Jul-11 1:42
Estys19-Jul-11 1:42 
GeneralRe: How to Finding Solutions Pin
Blue_Boy19-Jul-11 4:07
Blue_Boy19-Jul-11 4:07 
AnswerRe: How to Finding Solutions Pin
Pravin Patil, Mumbai19-Jul-11 0:02
Pravin Patil, Mumbai19-Jul-11 0:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.