![]() |
| | #1 |
| Registered User Join Date: Oct 2002
Posts: 92
| Time????? What will be the query????
__________________ AbHHinaay |
| planet_abhi is offline | |
| | #2 | |
| &TH of undefined behavior Join Date: Aug 2001
Posts: 5,215
| Quote:
Code: string UpdateString = "INSERT INTO SomeTable (DateField) VALUES (?DateField)";
MySqlConnection oCon = null;
MySqlCommand oCom = null;
try
{
oCon = new MySqlConnection();
oCon.ConnectionString =
ConfigurationSettings.AppSettings["ConnectionString"];
oCon.Open();
oCom = new MySqlCommand();
oCom.Connection = oCon;
oCom.CommandText = UpdateString;
oCom.Parameters.Add("?DateField", DateTime.Parse("01/01/1950"));
oCom.ExecuteNonQuery();
finally
{
if(oCon != null)
oCon.Close();
}
__________________ "If A is success in life, then A equals x plus y plus z. Work is x; y is play; and z is keeping your mouth shut." Albert Einstein (1879 - 1955) Board Rules | |
| Fordy is offline | |
| | #3 | |
| the hat of redundancy hat Join Date: Aug 2001 Location: Hannover, Germany
Posts: 2,769
| Quote:
Code: INSERT INTO YOUR_TABLE( YOUR_FIELD ) VALUES ( SYSDATE );
__________________ hth -nv She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate." When in doubt, read the FAQ. Then ask a smart question. | |
| nvoigt is offline | |
| | #4 |
| Banned Join Date: Feb 2003 Location: Australia
Posts: 986
| INSERT INTO myTable ([ADateColumn], [ATextColumn]) VALUES (getdate(), 'Paul Rocks') Is the SQL Server query. To execute the query, start here: http://msdn.microsoft.com/library/de...ClassTopic.asp |
| nickname_changed is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to get current time | tsubasa | C Programming | 3 | 05-01-2009 02:03 AM |
| How to improve time performance of these operations | lehe | C Programming | 11 | 03-29-2009 12:27 PM |
| Help with assignment! | RVDFan85 | C++ Programming | 12 | 12-03-2006 12:46 AM |
| calculating user time and time elapsed | Neildadon | C++ Programming | 0 | 02-10-2003 06:00 PM |
| time class | Unregistered | C++ Programming | 1 | 12-11-2001 10:12 PM |