Skip site navigation (1) Skip section navigation (2)

BUG #3613: Numeric type problem

From: "jack" <angel911(at)126(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #3613: Numeric type problem
Date: 2007-09-17 07:20:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      3613
Logged by:          jack
Email address:      angel911(at)126(dot)com
PostgreSQL version: 8.2.4
Operating system:   winxp
Description:        Numeric type problem

Hi All,
I met a numeric type problem,detail :
1.Programe language:vb6
2.Postgresql ole db provider version
3.Table jack_test has only one column "salary"( type is numeric(15,2))which
has two records 2.58,3.68. 

vb code:
Private Sub Command1_Click()
Dim conn As New ADODB.Connection
Dim rst As ADODB.Recordset
Dim num As Integer
Dim sql As String
On Error GoTo sqlerr
conn.ConnectionString = "Provider=PostgreSQL.1;Password=123456;User
ID=postgre;Data Source=;Location=BO1;"
conn.ConnectionTimeout = 30
sql = "select salary from jack_test"
  Set rst = CreateObject("adodb.recordset")
  With rst
  .ActiveConnection = conn
  .CursorLocation = adUseClient
  .CursorType = adOpenKeyset
  .Open sql
  While Not .EOF
  MsgBox (.Fields("salary"))
  End With
  Exit Sub
 MsgBox (Err.Description)
End Sub

When the CursorLocation set to adUseClient results:2,3,
the precision lost.When set to adUseServer resuls:2.58,3.68(right).Is the
problem cause by the ole provider?


pgsql-bugs by date

Next:From: Michael AkindeDate: 2007-09-17 13:36:54
Subject: BUG #3614: pg_config returns incorrect information for includedir-server
Previous:From: VijayDate: 2007-09-17 05:47:44
Subject: BUG #3612: Error Message in server.log

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group