Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / Ingres Topics / November 2003

Tip: Looking for answers? Try searching our database.

EQUEL CONNECT OPTION

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rémy - 19 Nov 2003 11:31 GMT
Hi ,

I have a problem on displaying a float value on my ingres database.the
version is 6.
I fact when displaying the Value is rounded.
For instance the value 11.0595E+6 is displaying as 1.106E+7.
How can I set the option of the precision of float in my EQUEL
session.
I saw that in sql command line you can do : sql -f8G16.8 database to
have the correct float precision in my session.
But I do not manage doing this in EQUEL ( Embedded QUEL ).I try to do
EXEC SQL CONNECT -f8G16.8 :database but that does not work.
Can you help me ?
Roy Hann - 19 Nov 2003 13:21 GMT
> Hi ,
>
[quoted text clipped - 9 lines]
> EXEC SQL CONNECT -f8G16.8 :database but that does not work.
> Can you help me ?

I'm not sure I can.  In an EQUEL application a floating point attribute is
returned as a 4-byte or 8-byte floating point value using the native
hardware representation of the client.  It actually is a hardware float4 or
float8, not a formatted ASCII representation of the float.  It is up to the
application to format it appropriately for display.  What is your host
language?

Roy Hann (rhann at rationalcommerce dot com)
Rational Commerce Ltd.
www.rationalcommerce.com
"Ingres development, tuning, and training experts"
kbcomput@kbcomputer.com - 19 Nov 2003 15:28 GMT
> I have a problem on displaying a float value on my ingres database.the
> version is 6.
[quoted text clipped - 7 lines]
> EXEC SQL CONNECT -f8G16.8 :database but that does not work.
> Can you help me ?

To answer your question, you need to put the -f8G16.8 flag onto
the ## ingres line, which is the QUEL equivalent of a CONNECT:
## ingres flag flag ... database-name

But as Roy pointed out, unless you're doing something like a
retrieve (thing=varchar(float_column)..., which does the conversion on
the server side, EQUEL is returning the float to your program as a float.
And, it's your program that's formatting it and displaying it!

Karl
R?my - 19 Nov 2003 16:13 GMT
> Hi ,
>
[quoted text clipped - 9 lines]
> EXEC SQL CONNECT -f8G16.8 :database but that does not work.
> Can you help me ?

I finally find how to set my options.
You have to do like this

EXEC SQL CONNECT :database options = "-f8G16.8";
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.