Opened 10 years ago

Closed 7 years ago

Last modified 7 years ago

#4475 closed defect (fixed)

GetFieldAsString interprets number values (no support of 64 bit integer)

Reported by: ivolimmen Owned by: warmerdam
Priority: normal Milestone: 2.0.0
Component: OGR_SF Version: 1.8.1
Severity: normal Keywords: 64 bit integer
Cc:

Description

When a feature (Oracle database in my case) contains a field with a long in it (i.e. 7120209826) it is returned by GetFieldAsString as a negative number. It returns the same value as GetFieldAsInteger. Because GetFieldAsInteger returns a negative number (the value is longer than an integer) I switched to GetFieldAsString but as it turns out it returns the same value.

Current workaround is:

  • prefixing the number with a '#' in the view in the database,
  • use GetFieldAsString,
  • removing the '#',
  • convert the string to long

Change History (3)

comment:1 by Even Rouault, 10 years ago

Component: CSharpBindingsOGR_SF
Keywords: 64 bit integer added
Owner: changed from tamas to warmerdam
Summary: GetFieldAsString interprets number valuesGetFieldAsString interprets number values (no support of 64 bit integer)

This sounds like another occurence of a known problem with the lack of 64 bit integer.

comment:2 by Even Rouault, 7 years ago

Milestone: 2.0
Resolution: fixed
Status: newclosed

comment:3 by Even Rouault, 7 years ago

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.