CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

MS SQL 2008 on ASP.NET Hosting



Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.microsoft_application_blocks Tags:
Item Type: NewsGroup Date Entered: 9/21/2006 11:36:30 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 70 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
ScottWhigham
Asp.Net User
How to Handle Decimal Precision & Scale with DAAB AddOutParameter?9/21/2006 11:36:30 AM

0/0

I'm trying to port my websites to the DAAB and I have a question: how do you get the output of a SQL Server DECIMAL(8,2) datatype in the AddOutParameter() method? Here's my original ADO.NET code:

SqlParameter pPrice = new SqlParameter("@Price", SqlDbType.Decimal);
pPrice.Precision = 8;
pPrice.Scale = 2;
pPrice.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(pPrice);

Which is passed to a SqlCommand named "myCommand" and executed blah blah blah. How can you do the same thing in the DAAB? The DAAB does not include precision and scale in any of the AddOutParameter() method overrides.

One note: I write for SQL Server and do not/will not be writing this code for any other system (if it makes any difference).

SqlDatabase has a generic AddParameter() method that does contain a precision/scale but it also includes  other things that don't matter to me (or don't make sense when using an OUTPUT param) such as DataRowVersion, SourceColumn, and value. It just doesn't seem to fit what I need: an output parameter for which I can define the precision and scale of a SQL Decimal datatype.

Help!
 

 

 


===========================
Check out my SQL Server site - http://www.learnsqlserver.com/

SQL Server Code Samples:
http://forums.learnsqlserver.com/CodeSamples.aspx
===========================
Javier Luna
Asp.Net User
Re: How to Handle Decimal Precision & Scale with DAAB AddOutParameter?9/22/2006 5:47:23 PM

0/0

Hi scott,

You would to use AddParameter. Non mean.

Good Coding!

Javier Luna
http://guydotnetxmlwebservices.blogspot.com/

 


from Villa El Salvador for world!
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
How to Handle Decimal Precision & Scale with DAAB AddOutParameter ... How can you do the same thing in the DAAB? The DAAB does not include precision and scale in any of the AddOutParameter() method overrides. ...
Building Blocks void AddParameter(string pName,decimal value) ... Name; Size; Precision; Scale; Nullability; Direction: Input/Output; SqlDbType ...
patterns & practices – Enterprise Library - Issue Tracker I am trying to use EntLib (DAAB) in order to create a CLR stored procedure ..... If I try to create a DECIMAL(24,6) parameter, the precision and scale are ...
Expert One-on-One Visual Basic 2005 Database Programming The trailing decimal values. in the mantissa for Discount values are the result of using the. real. (single-precision floating point) ...
patterns & practices – Enterprise Library - Discussions Latest post: ironside wrote: Doesn't Entlib automatically handle encrypting the entire DAAB section for you via the built in GUI? If you select the "Da. ...
re: In search of the perfect programmer's font - ISerializable ... For example, lets say you're accesing your DB via the DAAB. ...... round off the counter values in the performance analyzer to 6-8 digits after the decimal. ...
Appointment Scheduling Module - ng.asp-net-forum.dotnetnuke ... how to handle decimal precision & scale with daab addoutparameter? worldpay and dnn2.1.2 · placeholder and events? ...




Search This Site:










configuration file

microsoft.applicationblocks.exceptionmanagement and caching

enterprise library and web hosting

how to used addparameter method to add parameter?

requested registry access is not allowed (enterprise library)

applicationblocks referencing issue

database.createdatabase blows up.

getcurrenttask method

the type 'microsoft.practices.enterpriselibrary.common.instrumentation.iinstrumentationeventprovider' is defined in an assembly that is not referenced. you must add a reference to assembly 'microsoft.practices.enterpriselibrary.common, version=3.1.0.0, cul

caching an object

throwing exception

can i use enterprise library - january 2006 in microsoft visual web developer 2005 express edition?

sqlhelper and tranactions

how to get the connection string from a text file

has anyone used exception management...

simple navigation with microsoft application blocks??

why sqlhelper didn't has a close method

validation application block - enterprise library 3.1

smart client offline application block and remote caching

best way to pass the output parameters.

empty message column when logging an exception to database

helps with datarelations with data access application block.

block falls back to defaultpublisher when using custom

disposing the database object

custom trace listener

security exception in enterprise library

enterprise library config and vs 2008

can you use this with version 1.0 of the .net framework???

data access application block and transactionscope

is there a sqlhelper/mada equavlent for web service?

  Privacy | Contact Us
All Times Are GMT