[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How do I properly code the sizeof DbType.Date?

Posted on 2006-07-03
3
Medium Priority
?
518 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
  • 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month17 days, 14 hours left to enroll

831 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