?
Solved

How do I properly code the sizeof DbType.Date?

Posted on 2006-07-03
3
Medium Priority
?
498 Views
Last Modified: 2008-01-09
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?
0
Comment
Question by:chuang4630
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 1000 total points
ID: 17034919
you don't put any size at all:
db.AddOutParameter(command, "@CreationDate", DbType.Date);
0
 
LVL 1

Author Comment

by:chuang4630
ID: 17034948
I have tried, the error still exists:

No overload for method 'AddOutParameter' takes 3 parameters
0
 
LVL 1

Author Comment

by:chuang4630
ID: 17109496
Just to close it.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question