Reputation: 1 Apprentice
- Active Members
- Active Posts:
- 132 (0.17 per day)
- 31-January 12
- Profile Views:
- Last Active:
- Mar 10 2014 05:36 AM
- Who Cares
- OS Preference:
- Favorite Browser:
- Favorite Processor:
- Who Cares
- Favorite Gaming Platform:
- Your Car:
- Who Cares
- Dream Kudos:
Posts I've Made
Posted 10 Mar 2014Thanks for the replies I used windows form and a textbox as alternative to inputbox so I have better control
Posted 8 Mar 2014Thanks
Posted 8 Mar 2014Did you try my code? It will convert the string correctly to a decimal. It would have been better to sort your code before changing your data types without sorting the problem first. Also your sentences: "Something is not updated. I can still input numbers with decimal, but it still drops the decimal." doesn't make sense to me.
Hi, I haven't tried your code yesterday because I might run again with so many complications so I tried to simplify it by just changing my data type to "text" because as far as I know, everything will be accepted if the data type is "Text" on Access
Sorry about this
QuoteSomething is not updated. I can still input numbers with decimal, but it still drops the decimal.
QuoteSomething was not update
I think somewhere in the compiler, or xsd etc was not updated when i change the the srp data type from "Number" to "Text"
QuoteI can still input numbers with decimal, but it still drops the decimal
After changing my Access Database data type from "Number" to "Text" and trying to input numbers, I still get the same result as it drops the decimal or round it off
Ex. 123.8 output is 124
Dim srp As Decimal = Decimal.Parse(txtSRP.Text) Meat.ProductTableAdapter.Insert(txtName.Text, srp, ComboType.Text)
Database: MS Access 2007
Data Tyoe: Number
Field Size: Double
Decimal Place: 2
Entered Value 123.8
So if you put a break on line2 and in the immediate or watch window check the value of srp just before the insert what does it have (decimal or truncated value)?
Later on you posted a screen shot with the SRP column with the datatype property system.string. I'm not sure if this was before or after you changed your database for trying text, but that datatype property is important to avoid unintended implicit conversions.
I don't know how to use the break, probably you're talking about the "debugging" where you can see the number stored in the variable as the program runs. I will try to search again for that tutorial, I think I really need that.
QuoteI'm not sure if this was before or after you changed your database for trying text, but that datatype property is important to avoid unintended implicit conversions.
This was after I changed it to text.
Posted 8 Mar 2014Hi, I tried changing the data type to TEXT in my database and insert it as txtSRP.text so it will insert as is
But im getting this error of
Failed to convert parameter value from string to Int32
Something is not updated. I can still input numbers with decimal, but it still drops the decimal.
MaxLength is updated to 10
Posted 8 Mar 2014Thanks for the idea, I removed the Crystal Reports from the Project Reference. Though I'm not very sure on what I did, It cleared the warnings.
- Member Title:
- D.I.C Head
- Age Unknown
- Birthday Unknown