sql - Insert query in C# for GETDATE() -


may know how access getdate() value using insert query in c# (db connection), singe cell in row..

every time login page..instead update, use insert query display time in gridview column .. if use update query cant list of search values filtered using date

i have 4 columns(one primary too) in want change fourth cell getdate(). value using insert query challenging tried more cant result

primarycol.  col1      col2       col3    date(col4)  12345       aaa         4000.00   a121   2014-04-14 17:08:16.437 67890       bbb         3500.00   @121   2014-04-14 17:08:22.873 112233      ccc         2000.00   12345  2014-04-14 17:07:23.700 445566      ddd         6000.00   6789   2014-04-14 15:25:29.857   sqlcommand cmd = new sqlcommand(("insert tablename (date) values(getdate())"), con); 

init want insert again n again same datas ,rather date column

getdate() sql server function , msut call directly because query wll executed on server.

sqlcommand cmd = new sqlcommand(("insert tablename (date) values(getdate())"), con); 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -