How do I properly code the sizeof DbType.Date?

I use Enterprise Library to access the data store (SQL Server).

It is necessary to give the size of the data type in this method. How do I code it properly?

db.AddOutParameter(command, "@CreationDate", DbType.Date, sizeof(DbType.Date));

Compile error:  System.Data.DbType.Date is a 'field' but is used like a 'type'.

What should I do?
LVL 1
chuang4630Asked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
you don't put any size at all:
db.AddOutParameter(command, "@CreationDate", DbType.Date);
0
 
chuang4630Author Commented:
I have tried, the error still exists:

No overload for method 'AddOutParameter' takes 3 parameters
0
 
chuang4630Author Commented:
Just to close it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.