Click to See Complete Forum and Search --> : VB and SQL server passing dates


Patrick v O
December 20th, 1999, 04:08 PM
Inside each table I have a field that audits the user changes to a record. It is setup as a standard 8-byte DateTime field, but I would like to use the 4-byte SmallDateTime type. The default value is (getdate()), which works fine if I call it from a stored procedure or an embedded SQL string coming from VB. But when using the ADO recordset method AddNew and Update, I'm unable to tell SQL Server that it should write the default value (getdate()) in my record. I need the auditdate to be generated by SQL server and not by the client PC. For now, I use the DateTime field and have VB send the Now().
Any help is welcome.