If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Pervasive.SQL > Decimal data type incorrect results

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-05-04, 11:23
Todie Todie is offline
Registered User
 
Join Date: Mar 2004
Posts: 4
Decimal data type incorrect results

I hope someone can give me a clue what is happening.
(read - I am begging for help)

Pervasive SQL 2000i SP4
ODBC connection Visual basic app.

Using the decimal data (decimal(21,3)) type when a zero is eneterd into a field pervasive saves an incorrect number and repeats this number in other fields of that record that are/were equal to 0 (zero).

Example:
field 1 = 0 (entered by user)
field 2 = 0
field 3 = 5.225
field 4 = 0

record updated

results:

field 1 = 2685403.136
field 2 = 2685403.136
field 3 = 5.225
field 4 = 2685403.136
Reply With Quote
  #2 (permalink)  
Old 03-05-04, 11:35
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 1,026
If you use the PCC to enter 0 does it store the correct value? If so, then the problem is within the VB application. It's not a lot, but might help narrow down the problem.

Also, have you tried the SP4 HotFIxes? If those don't work, as a test you might try V8. Pervasive won't fix SP4 because it's in transition support.
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
  #3 (permalink)  
Old 03-05-04, 11:50
Todie Todie is offline
Registered User
 
Join Date: Mar 2004
Posts: 4
Quote:
Originally posted by mirtheil
If you use the PCC to enter 0 does it store the correct value? If so, then the problem is within the VB application. It's not a lot, but might help narrow down the problem.

Also, have you tried the SP4 HotFIxes? If those don't work, as a test you might try V8. Pervasive won't fix SP4 because it's in transition support.
thanks for the reply.
In PCC id does not seem to do this, however in stepping through VB the fileds show to be correct before and after the update.

I will look into the hotfixes.

Thanks again.
Reply With Quote
  #4 (permalink)  
Old 03-05-04, 12:37
Todie Todie is offline
Registered User
 
Join Date: Mar 2004
Posts: 4
I applied the hot fixes and this did not seem to help the problem.

I discovered that if the first decimal field in the record contains a value not equal to zero (< or > zero) then the problem does not occur in that record.

Stepping through the VB code I am unable to locate the number that is written to the database.
Reply With Quote
  #5 (permalink)  
Old 03-11-04, 12:21
Todie Todie is offline
Registered User
 
Join Date: Mar 2004
Posts: 4
Re: Decimal data type incorrect results

Was able to find the problem with help.
There is an OLEDB FTF for this problem.

Pervasive.SQL OLE DB Provider version 7.94 SP4 FTF
Released 6/26/2003
Build 253.125

Bug Number Bug Description
------ -------------------------------------------------------
44790 Conversion problems with numeric and decimal datatypes
Reply With Quote
  #6 (permalink)  
Old 03-11-04, 17:59
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 1,026
Good to hear you got it solved.
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
  #7 (permalink)  
Old 03-26-04, 09:49
DavidS_NL DavidS_NL is offline
Registered User
 
Join Date: Mar 2004
Posts: 2
Do you have a link to this solution, i have the same problem...

unbelievable but i can't find it with the search function on the pervasive website :/

Thanks in advance.
Reply With Quote
  #8 (permalink)  
Old 03-26-04, 12:13
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 1,026
You need to contact Pervasive to get FTFs. They don't post them because they don't get as much testing as a full service pack.
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
  #9 (permalink)  
Old 03-26-04, 14:48
DavidS_NL DavidS_NL is offline
Registered User
 
Join Date: Mar 2004
Posts: 2
ok thanks for the tip!

I'll test pervasive 2000i sp4 first, i hope that fixes the problem aswell.

we're running 2000i SP3 at the moment...i know the problem is also fixed in V8, but we can't force all our customers to buy V8.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Trackbacks are On
Pingbacks are On
Refbacks are On