Bugs
Search the entire project
This project's trackers
This project's forums
This project's tasks
This project's releases
This project's documents
This project's news
Project
People
Skill
Advanced search
Log In
|
New Account
Home
My Page
Projects
Code Snippets
Project Openings
PostgreSQL OLE DB provider for Windows
Summary
Activity
Forums
Tracker
Lists
Tasks
Docs
Surveys
News
SCM
Files
[#1000377] Numeric data being returned incorrectly
View Trackers
|
Bugs
|
Download .csv
|
Monitor
Date:
2005-08-24 19:07
Priority:
3
State:
Open
Submitted by:
Swapneel Kore (
swapneelkore
)
Assigned to:
Nobody (None)
Category:
Group:
v1.0.0.19
Resolution:
None
Summary:
Numeric data being returned incorrectly
Detailed description
Hi,
We have been encountering the following error with the oledb driver version 1.0.0.19
I have a table with the following structure:
create table n_test (
id integer primary key,
f1 numeric(12,2)
);
with the following values:
insert into n_test (id, f1) values (1, 100000);
If I execute the query "select f1 from n_test" via ADODB in VB 6.0, instead of 100000, all i get is 10.
On the other hand if I insert the value 1000 in the table, it is retreived correctly.
The VB code is as follows:
Dim acmd As New ADODB.Command
Dim aconn As New ADODB.Connection
Dim r As Recordset
aconn.ConnectionString = "Provider=PostgreSQL OLE DB Provider;Password=pass;User ID=user;Data Source=192.168.0.1;Location=erpdb;Extended Properties="""""
aconn.Open
'acmd.CommandType = adCmdUnknown
Set acmd.ActiveConnection = aconn
acmd.CommandText = "select f1 from n_test"
Set r = acmd.Execute()
On Error GoTo norecs
While Not r.EOF
Debug.Print r(0)
r.MoveNext
Wend
Debug.Print "Done"
Exit Sub
This happens with both 7.3 and 8.xx versions of the postgresql server.
This is a serious issue for us since we have implemented a large amount of code (an ERP for SMEs) and we are depending on this driver for the project to succeed.
I looked into the code of the driver, and I am no C/C++ programmer, but I was wondering if this problem has something to do with the implementation of GetWidth_numeric function in the TypeInfo.cpp file.
Hoping for an early resolution.
Swapneel
Followup
Message
Date: 2006-03-15 17:31
Sender:
Bohr John
I have the same issue. A simple SQL query like
select 320000::numeric;
returns 32 instead of 320000
select 3200000::numeric;
returns 320 ... etc
meanwhile, select 3200001::numeric;
returns 3200001
Attached Files:
Changes:
No Changes Have Been Made to This Item