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: 200709170720.l8H7K1NQ026984@wwwmaster.postgresql.org (view raw or flat)
Thread:
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
Details: 

Hi All,
I met a numeric type problem,detail :
  
1.Programe language:vb6
2.Postgresql ole db provider version 1.0.0.2
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=192.168.7.1;Location=BO1;"
conn.ConnectionTimeout = 30
conn.Open
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"))
  rst.MoveNext
  Wend
  End With
  Exit Sub
sqlerr:
 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?

Regards,
Jack

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-2014 The PostgreSQL Global Development Group