index > SQL Server Everywhere Edition > How to set the default value for a datetime culomn?

How to set the default value for a datetime culomn?

I try to set a default value (getdate()) for a datetime culomn in sql mobile,
but got error when i insert record:

there was a syntax error in the date format. [expression = getdate()]

may be I can only set a exict date ?

Guostong

If you want to insert current datetime by calling getdate() method, then it is possible in sql server everywhere. you can do like this;

insert into employee values (4,'John',25, getdate())

This will insert current datetime in the fourth column (in above example).

Please let me know if it answers your question.

Thanks

Sachin




Sachin
Sachin Sinha
reply 2

You can use google to search for other answers

 

More Articles

• ISNULL ( ) support in SQL Server mobile?
• SqlCeResultSet - Problem After Deleting First Record
• using sql Mobile Databases
• can pocpet pc direct connect to sql server 2005?
• Mobile Application Enquiry
• Execution plans - SQLCE 3
• How to check for table existence before dropping it?
• Getting RecordCount with TableDirect
• Funny problem (bug?) using MAX() on SQL Mobile
• SQL Server Mobile Stored Procedure?
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• Help me!emergency!
• How do I compact SDF with SQL Mobile 3.0
• SQL Server 2005 Everywhere Edition: Repl
• Triggers
• Emulator Error to replicate data on SQL
• Visual Studio 2005 The remote connection
• Typed sync controller classes
• SQL Mobile randomly crashes
• A call to Sql reconciler failed.
• EDB - CeGetDBInformationByHandle
• VS2005 and SQL Mobile 3.0 - Percent Comp
• Synchronisation using web service for PD
• How do I drop sql server mobile database
• System.AccessViolationException in Syste
• VS 2005 + sdf + foreign key

Hot Articles

• (SQL Mobile)Can SELECT, but cannot INSER
• SQL Mobile in pocketpc 2003 se desktop c
• query performance issue of Sql server 20
• Upgrade SQLServer Mobile (.sdf) database
• Smart Client - Data Centric - SQL 2K to
• sqlev maintenance utility
• Datasource cannot connect in vs2005
• HELP US MICROSOFT: SYNCH BETWEEN SQL EX
• Is there a limit to Number of SqlCeParam
• My SQL application on Windows Mobile 5
• Why EDB can't accept two properties with
• Buffer size not specified error
• How to create a SQL ev DB?
• sqlCeReplication.HostName size limit fix?
• SQL Server CE and Memory Issue

Recommend Articles

• Smart Client - Data Centric - SQL 2K to
• Access Database Synchronizer for SQL Exp
• SQL Mobile 2005 Replication - SQL Mobile
• SQL Mobile support for CE 4.2
• Inserting images
• 0x80040e21 error running SQLCE 2.0 on Wi
• Upgrade SQLServer Mobile (.sdf) database
• An incorrect or unsupported HTTP functio
• Inserting Server Collation on a connecti
• Production Version
• Exception thrown: database file cannot b
• a strange problem with RDA
• Data Source error?
• synchronization for PPC w/o internet
• Should I use Merge Replication ahead 3rd