🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #11263

Re: Variant types for Interbase data types

#11263
From: Edward Diener
Date: Sun, 01 Dec 2002 22:22
44 lines
2760 bytes
"Bill Todd" <bill@notthis.dbginc.com> wrote in message
news:s5tkuuklumb7k0o2tdo46fjujjtpf2v998@4ax.com...
> Assuming you are using Delphi,
>
> V := IBDataSet1.FieldByName('SomeField').Value;
>
> will give you the value of any field as a variant.

That's not the question. The question is: how do I convert DATE, TIME, and
TIMESTAMP variant values to values I can use in an SQL statement. Does SQL
using these types accept a 32 bit integer number, a 32 bit integer number,
or a 64 bit integer number respectively for each of these values, or do
these values have to be in some sort of string format, ie. for DATE "Dec
01,2002", to be accepted. If SQL accepts these values as just integer
numbers, then everything is fine, but if SQL needs some sort of string
values, then I have to convert them to some sort of acceptable string
format.

>
> On Sun, 1 Dec 2002 13:10:35 -0500, "Edward Diener"
> <eddielee@tropicsoft.com> wrote:
>
> >What are the equivalent variant types for the Interbase data types ? Some
of
> >these I can guess, particular the numeric, float, and character, but how
are
> >the DATE, TIME, and TIMESTAMP stored in Variants and what are the
equivalent
> >Variant types ?
> >
> >I want to take a Variant value and use its output streaming ability to
> >create values for an SQL INSERT or UPDATE statement. As far as I can see
> >this will work properly for INTEGER, SMALLINT, FLOAT, DOUBLE PRECISION,
> >NUMERIC, DECIMAL, CHAR, and VARCHAR but I do not think it will work for
the
> >DATE, TIME, and TIMESTAMP values without using low-level isc_ functions
that
> >convert these values in Variants to a form which SQL recognizes.
> >
>
>
> --
> Bill (TeamB)
> (TeamB cannot respond to questions received via email)
Technical Details
Message-ID: <3dea8b03$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!sn-xit-08!supernews.com!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3dea4ff3$1@newsgroups.borland.com> <s5tkuuklumb7k0o2tdo46fjujjtpf2v998@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 114a0e,4b82b358170a5247
X-Google-Attributes: gid114a0e,public
X-Google-ArrivalTime: 2002-12-01 14:39:01 PST
From: "Edward Diener" <eddielee@tropicsoft.com>
Newsgroups: borland.public.interbase.sql
References: <3dea4ff3$1@newsgroups.borland.com> <s5tkuuklumb7k0o2tdo46fjujjtpf2v998@4ax.com>
Subject: Re: Variant types for Interbase data types
Date: Sun, 1 Dec 2002 17:22:37 -0500
Lines: 46
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 216.175.67.251
Message-ID: <3dea8b03$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1038781187 216.175.67.251 (1 Dec 2002 14:19:47 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!sn-xit-08!supernews.com!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail