pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedODBC oin Windows
7+ messages / 4 participants
[nested] [flat]
* ODBC oin Windows
@ 2000-01-06 09:39 Didier Gasser-Morlay <didierg@visualgroup.com>
0 siblings, 0 replies; 7+ messages in thread
From: Didier Gasser-Morlay @ 2000-01-06 09:39 UTC (permalink / raw)
To: pgsql-interfaces
I have downloaded and happilly installed the odbc driver for Windows
from insightdist.com
I am using Delphi 4 SP3 on Windows NT 4 SP3 and I have the following
questions/problems
1. Money type is seen has a float. Delphi complains when trying to post
a float into a money
2. Int8 is seen as a 17 byte string
3. float4 is seens as using 8 bytes (as float8)
4. Since the money type is not recommended, I was planning to store
money amount in int8 forcing the number of decimals to a known number.
Since delphi sees int8 as a string this makes life a bit tricky,
especially doing calculations. How do you store large money amounts (4
bytes when you store e.g. italian Lira or Spanish Pesetas is a bit
small)
Any ideas ?
Didier
--
--------------------------------------------------------------------------------------------
Any views or opinions are solely those of the author and do not
necessarily
represent those of Visual Communications Group or its principal
operating
divisions (FPG, Telegraph Colour Library, Planet Earth Pictures,
Colorific!, Pix, Giraudon, Bavaria Bildagentur).
--------------------------------------------------------------------------------------------
The information transmitted is intended only for the person or entity to
which
it is addressed, and may contain confidential and/or privileged
material.
If you are not the intended recipient of this message, please do not
read,
copy, use or disclose this communication; and please notify the sender
immediately. It should be noted that any review, retransmission,
dissemination or other use of, or taking action in reliance upon, this
information by persons or entities other than the intended recipient is
prohibited.
--------------------------------------------------------------------------------------------
^ permalink raw reply [nested|flat] 7+ messages in thread
* RE: [INTERFACES] ODBC oin Windows
@ 2000-01-06 17:05 Michael J Davis <michael.j.davis@tvguide.com>
0 siblings, 0 replies; 7+ messages in thread
From: Michael J Davis @ 2000-01-06 17:05 UTC (permalink / raw)
To: 'Didier Gasser-Morlay' <didierg@visualgroup.com>; pgsql-interfaces
Use the numeric data type. You must have Postgres 6.5 or greater.
Michael J Davis
BackOffice Development, TV Guide Networks
Office: 303-267-6809 Fax: 303-267-6889
Home Office: 303-460-7360 Fax: 303-460-7362
Pager: 303-461-4002
Email: Michael.J.Davis@tvguide.com
> -----Original Message-----
> From: Didier Gasser-Morlay [SMTP:didierg@visualgroup.com]
> Sent: Thursday, January 06, 2000 2:40 AM
> To: pgsql-interfaces@postgreSQL.org
> Subject: [INTERFACES] ODBC oin Windows
>
> I have downloaded and happilly installed the odbc driver for Windows
> from insightdist.com
>
> I am using Delphi 4 SP3 on Windows NT 4 SP3 and I have the following
> questions/problems
>
> 1. Money type is seen has a float. Delphi complains when trying to post
> a float into a money
> 2. Int8 is seen as a 17 byte string
> 3. float4 is seens as using 8 bytes (as float8)
>
> 4. Since the money type is not recommended, I was planning to store
> money amount in int8 forcing the number of decimals to a known number.
> Since delphi sees int8 as a string this makes life a bit tricky,
> especially doing calculations. How do you store large money amounts (4
> bytes when you store e.g. italian Lira or Spanish Pesetas is a bit
> small)
>
> Any ideas ?
>
> Didier
>
>
>
>
> --
> --------------------------------------------------------------------------
> ------------------
> Any views or opinions are solely those of the author and do not
> necessarily
> represent those of Visual Communications Group or its principal
> operating
> divisions (FPG, Telegraph Colour Library, Planet Earth Pictures,
> Colorific!, Pix, Giraudon, Bavaria Bildagentur).
> --------------------------------------------------------------------------
> ------------------
> The information transmitted is intended only for the person or entity to
> which
> it is addressed, and may contain confidential and/or privileged
> material.
> If you are not the intended recipient of this message, please do not
> read,
> copy, use or disclose this communication; and please notify the sender
> immediately. It should be noted that any review, retransmission,
> dissemination or other use of, or taking action in reliance upon, this
> information by persons or entities other than the intended recipient is
> prohibited.
> --------------------------------------------------------------------------
> ------------------
>
> ************
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [INTERFACES] ODBC oin Windows
@ 2000-01-06 18:55 Ken J. Wright <ken@ori-ind.com>
0 siblings, 1 reply; 7+ messages in thread
From: Ken J. Wright @ 2000-01-06 18:55 UTC (permalink / raw)
To: Didier Gasser-Morlay <didierg@visualgroup.com>; pgsql-interfaces
>1. Money type is seen has a float. Delphi complains when trying to post
Use the decimal type from 6.5.x
>2. Int8 is seen as a 17 byte string
>3. float4 is seens as using 8 bytes (as float8)
How are you viewing this data? Delphi provides casting methods
(AsString,AsFloat,etc) to convert a fields raw data to an appropriate data
type for your app.
f := Dataset.FieldByName('SomeField').AsFloat;
Ken
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [INTERFACES] ODBC oin Windows
@ 2000-01-07 03:20 Sergio A. Kessler <ser@perio.unlp.edu.ar>
parent: Ken J. Wright <ken@ori-ind.com>
0 siblings, 0 replies; 7+ messages in thread
From: Sergio A. Kessler @ 2000-01-07 03:20 UTC (permalink / raw)
To: Ken J. Wright <ken@ori-ind.com>; +Cc: Didier Gasser-Morlay <didierg@visualgroup.com>; pgsql-interfaces
"Ken J. Wright" wrote:
>
> >1. Money type is seen has a float. Delphi complains when trying to post
>
> Use the decimal type from 6.5.x
>
> >2. Int8 is seen as a 17 byte string
> >3. float4 is seens as using 8 bytes (as float8)
>
> How are you viewing this data? Delphi provides casting methods
> (AsString,AsFloat,etc) to convert a fields raw data to an appropriate data
> type for your app.
>
> f := Dataset.FieldByName('SomeField').AsFloat;
if you are using Delphi, maybe you want to check the Export
utility in http://sak.org.ar, it takes any database supported
by the BDE and translate it to sql scripts (I've used it many
times to convert db's to Postgres)
and while we are on the subject, you may want to check mOdbc
http://perio.unlp.edu.ar/modbc (native odbc components for
Delphi and BCBuilder, no mo BDE)
I'm using it with Postgres for years now.
all of this is free software, of course ...
(beware, the connection is f* slow, as a adsl modem stopped
to work the past weekend, Y2K bug ?)
--
-= Sergio A. Kessler == http://sak.org.ar =-
You can have it soon, cheap and working; choose *two*.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [INTERFACES] ODBC oin Windows
@ 2000-01-07 21:49 Ken J. Wright <ken@ori-ind.com>
0 siblings, 0 replies; 7+ messages in thread
From: Ken J. Wright @ 2000-01-07 21:49 UTC (permalink / raw)
To: Didier Gasser-Morlay <didierg@visualgroup.com>; +Cc: pgsql-interfaces@postgreSQL.org, Byron Nikolaidis <byron.nikolaidis@home.com>
At 09:12 01/07/2000 +0000, Didier Gasser-Morlay wrote:
>In a tdbgrid component.
Just to confirm, you're checking the data type by looking at
dbgrid.fields[x].datatype/size?
>I have now tried the Numeric data type (as advised by Michael J davis)
>as in Numeric (10,2). D4 sees it as a char(255) !!!!
This is a driver issue.
**
Byron, the decimal (numeric) type has never been added to the driver.
**
Your driver setting is probably set to convert unknowns to maxvarchar,
which the BDE converts to char(255). That's where I don't like the BDE. It
does things for you that you are not aware of.
Along with the links that Sergio sent, also look at
http://www.odbcexpress.com for an industrial strength odbc api for Delphi.
Not free however.
>I am using PG 6.5.1 should I upgrade to 6.5.3 or to that respect would
>there be NO difference ?
No difference.
Ken
>
>Didier
>
>
>
>"Ken J. Wright" wrote:
>>
>> >1. Money type is seen has a float. Delphi complains when trying to post
>>
>> Use the decimal type from 6.5.x
>>
>> >2. Int8 is seen as a 17 byte string
>> >3. float4 is seens as using 8 bytes (as float8)
>>
>> How are you viewing this data? Delphi provides casting methods
>> (AsString,AsFloat,etc) to convert a fields raw data to an appropriate data
>> type for your app.
>>
>> f := Dataset.FieldByName('SomeField').AsFloat;
>>
>> Ken
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [INTERFACES] ODBC oin Windows
@ 2000-01-07 23:41 Ken J. Wright <ken@ori-ind.com>
0 siblings, 0 replies; 7+ messages in thread
From: Ken J. Wright @ 2000-01-07 23:41 UTC (permalink / raw)
To: Didier Gasser-Morlay <didierg@visualgroup.com>; +Cc: pgsql-interfaces@postgreSQL.org, Byron Nikolaidis <byron.nikolaidis@home.com>
>**
>Byron, the decimal (numeric) type has never been added to the driver.
>**
int8 type is also missing in the driver. BDE returns a char(16).
Ken
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [INTERFACES] ODBC oin Windows
@ 2000-01-25 20:37 Ken J. Wright <ken@ori-ind.com>
0 siblings, 0 replies; 7+ messages in thread
From: Ken J. Wright @ 2000-01-25 20:37 UTC (permalink / raw)
To: Byron Nikolaidis <byron.nikolaidis@home.com>; +Cc: pgsql-interfaces
Byron,
Just a reminder.....
>**
>Byron, the decimal (numeric) type has never been added to the driver.
>**
int8 type is also missing in the driver.
Ken
************
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2000-01-25 20:37 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-01-06 09:39 ODBC oin Windows Didier Gasser-Morlay <didierg@visualgroup.com>
2000-01-06 17:05 RE: [INTERFACES] ODBC oin Windows Michael J Davis <michael.j.davis@tvguide.com>
2000-01-06 18:55 Re: [INTERFACES] ODBC oin Windows Ken J. Wright <ken@ori-ind.com>
2000-01-07 03:20 ` Sergio A. Kessler <ser@perio.unlp.edu.ar>
2000-01-07 21:49 Re: [INTERFACES] ODBC oin Windows Ken J. Wright <ken@ori-ind.com>
2000-01-07 23:41 Re: [INTERFACES] ODBC oin Windows Ken J. Wright <ken@ori-ind.com>
2000-01-25 20:37 Re: [INTERFACES] ODBC oin Windows Ken J. Wright <ken@ori-ind.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox