hi everyone, im having trouble with my code here, please help me. i have a button edit and my code is

Cmd2.CommandText = "UPDATE Project SET FILE = " + "'" + MyTable2.Rows[j]["FILE"].ToString() + "', " + "DATE = " + "'" + Convert.ToDateTime(MyTable2.Rows[j]["DATET"].ToString()) + "' " "WHERE ID = " + "'" + MyTable2.Rows[j]["ID"].ToString() + "'";

in my access DB
FILE is text
Date is Date/Time
ID is text

then when i change a value in date and clk edit a message appear and says Input string was not in a correct format. can anyone help me with this? thank you very very much in advance... :-)

Can you please elaborate a bit more. It's very difficult to understand what you're trying to do.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.