473,624 Members | 2,601 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,D ate_Update=getd ate(),Update_By =@user_id WHERE Personel_No=@us er_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 1562
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
1976
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 when I am importing data from flat file through DTS the trigger is not working.How to solve this. Regards Arijit Chatterjee
6
3903
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
1943
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 extra thing to. The datatype is a class I made. Is there anyway for me to test a parameters datatype in a template using function?
0
1681
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 the Clone() method. Before I add the new DataTable to the DataSet, I change the DataType of a DataColumn from System.String to System.Int64. I then add data to the new table and then add it to the DataSet. Then DataSet is then added to the Cache....
2
4452
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 know. This snippet is easily dropped into any project, THANKS namespace QCLoader { public class disksetitem {
3
3335
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 currency data type in asp.net and the type is idenfied as decimal. I have two fields defined in Sql-Server, one is money and other is decimal. In asp.net both are identified as decimal.
4
11958
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? Thanks for your help!!
4
1745
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
5351
by: monotosh | last post by:
can anybody tell what is the datatype : int x; int * p = &x ; //error int * (10) p1 = &x ; //error
0
8249
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8179
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8685
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8633
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6112
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4084
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2613
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1493
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.