Subject | RE: [IBO] Schema Cache |
---|---|
Author | Paul Vinkenoog |
Post date | 2002-08-02T13:46:31Z |
Hello Helen,
doesn't exist. This happens in TIB_SchemaCache.GetlocalFileName - it
even creates an entire tree if necessary.
So setting SchemaCacheDir to e.g.
D:\path\to\existing\dir
is fine of course - IBO only needs to create the subdir with the DB name.
But also if you specify
D:\existing\path\nonexisting_subdir
...IBO creates nonexisting_subdir on the fly as soon as it is needed,
along with the DB subdir.
And even
D:\totally\nonexistent\directory\tree
works like a charm. (Wow! Who needs mkdir if you have IBO? :-))
Specifying a relative dir causes an exception though, not because of
IBO itself, but because of the way ForceDirectories (which is called
by TIB_SchemaCache.GetLocalFileName) works.
All this using IBO 4.2.Hg on W2K.
But I wonder if this has anything to do with Ales' problem, because if
this relative directory creating goes wrong, you get exceptions, not
just an empty TableNames. Unless of course you intercept exceptions
using empty catch blocks.
Ales, maybe you can try setting SchemaCacheDir to the empty string.
This should always work. If it doesn't, you know the problem has
nothing to do with local schema cache dirs/files.
Oh, just thought of something else: if ForceDirectories fails
e.g. because of directory permissions, it doesn't throw an exception
but returns false. However, IBO doesn't check this return value, so in
that case you might get a silent failure and an empty TableNames
(haven't tried that one out though)
HTH,
Paul
> You need to create the local directory - the IB_Connection componentI've just tried this out and the specified directory is created if it
> doesn't do that...so, either create the directory as part of your
> deployment process or have your app create it if it doesn't exist...
doesn't exist. This happens in TIB_SchemaCache.GetlocalFileName - it
even creates an entire tree if necessary.
So setting SchemaCacheDir to e.g.
D:\path\to\existing\dir
is fine of course - IBO only needs to create the subdir with the DB name.
But also if you specify
D:\existing\path\nonexisting_subdir
...IBO creates nonexisting_subdir on the fly as soon as it is needed,
along with the DB subdir.
And even
D:\totally\nonexistent\directory\tree
works like a charm. (Wow! Who needs mkdir if you have IBO? :-))
Specifying a relative dir causes an exception though, not because of
IBO itself, but because of the way ForceDirectories (which is called
by TIB_SchemaCache.GetLocalFileName) works.
All this using IBO 4.2.Hg on W2K.
But I wonder if this has anything to do with Ales' problem, because if
this relative directory creating goes wrong, you get exceptions, not
just an empty TableNames. Unless of course you intercept exceptions
using empty catch blocks.
Ales, maybe you can try setting SchemaCacheDir to the empty string.
This should always work. If it doesn't, you know the problem has
nothing to do with local schema cache dirs/files.
Oh, just thought of something else: if ForceDirectories fails
e.g. because of directory permissions, it doesn't throw an exception
but returns false. However, IBO doesn't check this return value, so in
that case you might get a silent failure and an empty TableNames
(haven't tried that one out though)
HTH,
Paul