Subject Re: [IBO] Sample IBOQuery (project) questions
Author Peter Richards

On 4 Oct 2001, at 21:38, Helen Borrie wrote:

> At 05:21 PM 04-10-01 +0800, Peter Richards wrote:
> > >
> > > Are you sure that the gds32.dll on your client machine is not a 5.x
> > > version?
> >
> >I have two gds32.dll
> >
> >c:\windows\system
> >f:\Program Files\Borland\InterBase\Backup
> >
> >Both are version , the one in the windows dir has a later date
> After you have __connected__ to the database using IB_SQL, what dialect is
> being reported on the Connection tab?

Dialect 3

> >So are you saying that even though I have created the GDB as dialect 3,
> >and defined a column as datatype DATE, because it is dialect 3, it expects
> >the datatype to be TIMESTAMP ?
> No. If you have __actually__ got a dialect 3 database, a column defined as
> DATE will be a dialect 3 DATE type. If your database is in fact a dialect
> 1, a column defined as DATE will be the equivalent of TIMESTAMP.

It was built as Dialect 3. The problem with the date (data) is that it is
from a Dbase III+ file, and there is no datatype like TIMESTAMP, there
is not even one for TIME.

> > > OTOH, in Dialect 3, you can't pass a date literal to the date and time
> > > types, you have to cast it:
> > >
> >I tried the CAST statement, but same error.
> What EXACTLY is the error message ?

Sorry, it wasn't an error message when I did the CAST, that worked fine,
no messages. The only error msg is

Project IBOQuery.exe raised exception class EDBEngineError with
message 'General SQL error.

Column error.
Column unknown
Client SQL dialect 1 does not support reference to DATE datatype'.

Click OK, and "Run" and I can view the data.

BTW, I don't get the message when I just run the executable IBOQuery,
only when I use F9 from Delphi. If it's no big deal, and I have 100%
assurance that a user isn't going to have the program abort, then I'm
prepared to ignore it.

> >Where can I reda up on datatypes, the IBConsole help is not deep
> >enough.
> In the Data Definition manual, the section on datatypes.

I can't see such a help file in either D6 or Interbase help files.

> > > Also, I don't think BLOB SUB_TYPE TEXT is valid DDL either. BLOB
> > > SUB_TYPE 1 is what you specify for text blobs.
> >
> >Okay, but consider the following (same data )
> >
> >IbConsole Blobs can be viewed (opened)
> >IB_SQL Blobs can be viewed (opened)
> >IBOQuery Project Blobs can't be viewed
> What kind of control are you trying to view the blob column in? A TDBGrid?


> AFAIK, the VCL TDbGrid doesn't support displaying blobs in a grid.

How does IB_SQL do it then, the grid display shows blobs just how we
need them.

> Display a TDBMemo alongside the grid, linked to the same datasource and to
> the blob datafield; then, as you scroll through the grid you will see the
> contents of the blob field.

I think I'm getting too confused because I'm trying to skip learning
Delphi and jumped straight into IBO. All we need is a TDBGrid type
display for a single table showing the blob column (user can dble-click
to open) and the other 3 columns. An IBOQuery runs when the user
presses a button. I don't want to go near the BDE.

Maybe I should stop wasting your time (much appreciated though) and
at least go thru the IBO tutorial.

> NB, make sure that you instantiate the virtual field objects of your
> dataset (set the query Active,

When I tried that, it was the same message I got when I tried to change
the Datfield property of the TDBMemo object, the msg is

ISC ERROR CODE :335544344


I/O error for file 'C:\Program Files\......\mastsql.gdb'

of course the file doesn't exist, but I searched the source, and changed
the value to point to the GDB I want to use. Where is it looking.

I notice in the TDatabase , it has an alias dropdown, which are the BDE

> then dbl-click on the iboquery, right-click on the window and select Add
> All Fields.) Select the blob field and, if necessary, change its
> FieldType to ftMemo.
> >All things being equal, it is the IBOQuery, or more to the point, I'm
> >learning Delphi, so pls pardon my ignorance of where to look.
> >
> >The TDBGrid dataset value is IBOQuery.
> No, the DBGrid must be linked through its Datasource property to a
> TDatasource. This TDatasource in turn must be linked to your dataset
> through its Dataset property. Or is this what you meant?

Thanks for your help, much appreciated, I really need to start with the
basics, so will do the IBO tutorial, then build osmething very simple to
begin with. Looks like using IBO is so much connection orientated.