To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
VBForums  

VB Wire News
Article :: Building Dynamic Systems with Expressions in .NET
How Is XML Like An Interface?
Understanding Covariance and Contravariance
Print VS 2010 Keyboard Shortcut References in Letter (8.5x11in) and A4 (210×297mm) Sizes
Updated Productivity Power Tools



Go Back   VBForums > Visual Basic > Database Development

Reply Post New Thread
 
Thread Tools Display Modes
Old Aug 9th, 2004, 08:08 AM   #1
Videle
New Member
 
Join Date: Aug 04
Location: Lithuania
Posts: 2
Videle is an unknown quantity at this point (<10)
Question problems with data of decimal type!

I have read a lot of stuff, but haven't found anything needful! You are my last hope
So the problem is:
my database is created by using Access 2000. Some fields have data of decimal type.
so when i run my program and try to set new records and display them into datagrid I get the error "Data type mismatch in criteria expression".
I have noticed, that my program don't understand, what a comma is. Simple it is missed then I try to save new records.
example:
I set: 565,236
after saving: 565236

Everything is OK, when I set Single type instead Decimal type, but I need Decimal type...

If somebody has any seggetions, please, let me know!
Videle is offline   Reply With Quote
Old Aug 9th, 2004, 08:49 AM   #2
szlamany
MS SQL Powerposter
 
szlamany's Avatar
 
Join Date: Mar 04
Location: CT
Posts: 12,366
szlamany has much to be proud of (1500+)szlamany has much to be proud of (1500+)szlamany has much to be proud of (1500+)szlamany has much to be proud of (1500+)szlamany has much to be proud of (1500+)szlamany has much to be proud of (1500+)szlamany has much to be proud of (1500+)szlamany has much to be proud of (1500+)szlamany has much to be proud of (1500+)szlamany has much to be proud of (1500+)szlamany has much to be proud of (1500+)
COMMA in the THOUSANDS position is a formatting character - it should not be stored in the DB or sent to the DB for storage. It is not a number with a "COMMA" in the thousands position.

BTW - not sure what you meant by SINGLE type - but you should not convert DECIMAL DB types to SINGLE (floating point) - try currency datatype, maybe...
szlamany is offline   Reply With Quote
Old Aug 10th, 2004, 05:13 AM   #3
Videle
New Member
 
Join Date: Aug 04
Location: Lithuania
Posts: 2
Videle is an unknown quantity at this point (<10)
I think now I understand my problem.
In my country the decimal separator is a comma (,) and in most country the decimal separator is a point (.).
So when I changed (Contral Panel/Regional and Language settings) Standarts and Formats to English, then the problem disappeared...
Videle is offline   Reply With Quote
Reply

Go Back   VBForums > Visual Basic > Database Development


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 07:54 PM.





Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.