473,500 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Probs datatype both in ASP & SQLDB

83 New Member
Microsoft OLE DB Provider for SQL Server error '80004005'

The precision is invalid.

/Intranet/hr/Change_Password_db.asp, line 16
-------------------------------------------------------------------------------------------------------------------
Expand|Select|Wrap|Line Numbers
  1. rm.Parameters.Append rm.CreateParameter("@user_id",adNumeric,adParamInput,8,request("NoStaf"))
-----------------------------ON STORE PROCEDURE------------------------------------------------
[code]
[@user_id numeric(8),
..
UPDATE TblUser_ID SET Password=@pwd,Date_Update=getdate(),Update_By=@use r_id WHERE Personel_No=@user_id
/CODE]
The reason I change to numeric datatype:/
Expand|Select|Wrap|Line Numbers
  1. CREATE TABLE [dbo].[tblUser_ID](
  2.     [Personel_No] [numeric](8, 0) NOT NULL,
Problems occur when I change from varchar datatype to numeric type....
For some reason INSERT statement on store procedure run smoothly without error, But not for UPDATE statement????
Sep 25 '08 #1
1 1557
MATTXtwo
83 New Member
Again I found some solution on this link
Precission Invalid
that uses this code
Expand|Select|Wrap|Line Numbers
  1. set param=rm.CreateParameter("@user_id",adNumeric,adParamInput,8,request("NoStaf"))
  2. param.precision=18            'Solution for 
  3. param.numericscale=0        'Microsoft OLE DB Provider for SQL Server error '80004005'
  4. rm.Parameters.Append param    'The precision is invalid.
You know why???
Coz for datatype numeric and decimal it was a problem for old version asp
need to declare the precision and numericscale said by MSN.
That's OK, other thing make me mad is MSN link for this solution is broken
So if you're lucky you'ill find this article, if not you're on your own
Sep 25 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1961
by: Arijit Chatterjee | last post by:
Hi Everybody, I am facing another probs. I have created a trigger for table Tab1 for perticular column col1 for checking value ranges.But at time for using insert statement it is working fine but...
6
3885
by: The Plankmeister | last post by:
Hi.. I'm trying to achieve a newline effect within a <dt> block, but am having problems. Here is the basic code: <dl> <dt> <a href="admin_menu.html" class="small">Click here to modify the
8
1931
by: Eternally | last post by:
Hi folks, I've got a program which has a function which uses templates to accept parameters of any type. Works well, but there's one certain datatype which I want to special case and do an...
0
1659
by: SoYouKnowBrig | last post by:
Hi All, I am using Microsoft.ApplicationBlocks.Cache.CacheManager to persist a System.Data.Dataset object. This Dataset object has a DataTable that is created from an existing DataTable using...
2
4442
by: andrewcw | last post by:
Seems it should be simple. I had problems with a larger class and the newsgroup suggested something I also tried. So I pruned my class to see if I could find out what could be wrong, Still dont...
3
3326
by: Sri | last post by:
In VB, to know the field type of a column stored in a recordset the command I use is If rsQuery.Fields(k).Type = adCurrency Then How will I achieve the same in ASP.net. I could not find a...
4
11946
by: Orchid | last post by:
How can I change a Date datatype to a Number datatype? For example, I want a date 10/31/2006 to show 1031 as Number datatype. But I don't want it becomes 39021. What formula should I use? ...
4
1740
by: sherry3718 | last post by:
hi, anyone would guid me to links about these topics? I mean using tables that have lookup datatype feilds in linking 2 forms.
2
5318
by: monotosh | last post by:
can anybody tell what is the datatype : int x; int * p = &x ; //error int * (10) p1 = &x ; //error
0
7018
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
7182
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
7232
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...
1
6906
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5490
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4923
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3110
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3106
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
672
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.