473,396 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

int to numeric numeric(18,2) ?

I have a column that is numeric(18,2) in sql server.

what type should I use in my sqldatasource parameter in asp.net?
<asp:Parameter Name="CreditLimit" Type="Int32" />
what type should I use in my vb.net method that updates this?
ByVal CreditLimit As Integer

What type should I use in my
parameters.Add("@CreditLimit", SqlDbType.Int).Value = CreditLimit

The list combinations do not work as on the way to to the database I
can't send 50.00, but if I enter 50 I do get 50.00 back.

Clearly something I've overlooked, I dont see type numeric or money..?

Jul 21 '07 #1
2 6050
Have you tried using the Decimal type in your code? For example (not
tested):

<asp:Parameter Name="CreditLimit" Type="Decimal" />

ByVal CreditLimit As Decimal

"jobs" <jo**@webdos.comwrote in message
news:11**********************@22g2000hsm.googlegro ups.com...
>I have a column that is numeric(18,2) in sql server.

what type should I use in my sqldatasource parameter in asp.net?
<asp:Parameter Name="CreditLimit" Type="Int32" />
what type should I use in my vb.net method that updates this?
ByVal CreditLimit As Integer

What type should I use in my
parameters.Add("@CreditLimit", SqlDbType.Int).Value = CreditLimit

The list combinations do not work as on the way to to the database I
can't send 50.00, but if I enter 50 I do get 50.00 back.

Clearly something I've overlooked, I dont see type numeric or money..?
Jul 21 '07 #2
jobs wrote:
I have a column that is numeric(18,2) in sql server.
The type numeric is a synonym for decimal.
what type should I use in my sqldatasource parameter in asp.net?
<asp:Parameter Name="CreditLimit" Type="Int32" />
Decimal
>
what type should I use in my vb.net method that updates this?
ByVal CreditLimit As Integer
Decimal
What type should I use in my
parameters.Add("@CreditLimit", SqlDbType.Int).Value = CreditLimit
SqlDbType.Decimal
The list combinations do not work as on the way to to the database I
can't send 50.00, but if I enter 50 I do get 50.00 back.

Clearly something I've overlooked, I dont see type numeric or money..?

--
Göran Andersson
_____
http://www.guffa.com
Jul 22 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Stephen Boulet | last post by:
I have a long list of floats (1613808 elements long). It takes quite a while to load this into a 7 dimensional Numeric array. Is there any obvious way to speed this up? def...
0
by: Cedric | last post by:
This is a 3 weeks old problem, but having found a solution (and having looked for one here, finding only this message), I'm replying now. From: Jive (someone@microsoft.com) Subject: Upgrade...
5
by: David Garamond | last post by:
In Interbase and Firebird, NUMERIC is implemented as 64-bit integer. This limits the range to NUMERIC(18, *) but for many uses that's adequate. And moreover it's fast and efficient. Is there a...
2
by: al | last post by:
Dim dbParam_amount As System.Data.IDataParameter = New System.Data.SqlClient.SqlParameter dbParam_amount.ParameterName = "@amount" dbParam_amount.Value = amount.text dbParam_amount.DbType =...
10
by: Rob Nicholson | last post by:
In our application, we've added a bit of JavaScript that updates a title as the user types into a textbox. To trigger this, we patch into the "onkeyup" and "onpaste" events: ...
3
by: vellons | last post by:
hi all, I want to do the following statement "ALTER TABLE TT ALTER COLUMN CC DECIMAL (18,2)" but doesn´t work. I´ve tried it on differents ways but keep not working. I don´t know if I can do...
6
by: Sheldon | last post by:
Hi, I am trying to build a large array using concatenate function in python. So as I loop over the number of arrays, of which there are 12 (4 down and 3 across), I create 3 long arrays by...
8
by: .Net Sports | last post by:
I am checking for text input on a form validation in javascript that required at least one numeric character along with any number of alpha characters for a given input text box. The below is a var...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.