Subject | RE: [firebird-support] Embedded SQL error |
---|---|
Author | Mike Baker |
Post date | 2004-05-26T13:05:35Z |
Helen, you are correct in your assessment. It turns out that my connection
statement is causing all of the other gpre errors. When I moved the
connection statement to the end of my source file, gpre ran and generated
the .c file (had other errors, but that's for another session). Let me
explain what I am trying to accomplish. I have an IO module that is
compiled as a DLL that other modules call to access the database. This was
originally written to work with Sybase and MS SQL Server. These are working
and currently in production. I wish to port this to Firebird. I have a
function;
EXPORT int CALLBACK SqlConnect (char *pszDatabasePath)
{
strcpy (szDBName, pszDatabasePath);
EXEC SQL
SET DATABASE DB1 = COMPILETIME 'C:\Server\MyDatabase.fdb';
EXEC SQL
CONNECT :szDBName AS DB1;
return ((int)SQLCODE);
}
... Other SQL functions follow ...
With this function at the head of my functions, gpre generates those
ambiguous error messages. BTW, szDBName is defined as a host variable at
the top of the source file.
Thanks for the help,
Mike
________________________________
From: Helen Borrie [mailto:helebor@...]
Mike,
At 02:13 PM 25/05/2004 -0400, you wrote:
that is
being reported. This could be due to a bug in gpre (that hasn't
caught up
with changes in the message set) or to having the wrong version of
firebird.msg in the root directory (of server and/or client).
Are you using the correct version of gpre for the server?
It shouldn't be possible to get an ambiguity exception in a straight
insert
(as you reported initially).
/heLen
statement is causing all of the other gpre errors. When I moved the
connection statement to the end of my source file, gpre ran and generated
the .c file (had other errors, but that's for another session). Let me
explain what I am trying to accomplish. I have an IO module that is
compiled as a DLL that other modules call to access the database. This was
originally written to work with Sybase and MS SQL Server. These are working
and currently in production. I wish to port this to Firebird. I have a
function;
EXPORT int CALLBACK SqlConnect (char *pszDatabasePath)
{
strcpy (szDBName, pszDatabasePath);
EXEC SQL
SET DATABASE DB1 = COMPILETIME 'C:\Server\MyDatabase.fdb';
EXEC SQL
CONNECT :szDBName AS DB1;
return ((int)SQLCODE);
}
... Other SQL functions follow ...
With this function at the head of my functions, gpre generates those
ambiguous error messages. BTW, szDBName is defined as a host variable at
the top of the source file.
Thanks for the help,
Mike
________________________________
From: Helen Borrie [mailto:helebor@...]
Mike,
At 02:13 PM 25/05/2004 -0400, you wrote:
>Thanks Nick. I get this same error message on all of my SQLstatements,
>SELECT, DELETE, etc.It could be that you have some kind of exception, but not the one
that is
being reported. This could be due to a bug in gpre (that hasn't
caught up
with changes in the message set) or to having the wrong version of
firebird.msg in the root directory (of server and/or client).
Are you using the correct version of gpre for the server?
It shouldn't be possible to get an ambiguity exception in a straight
insert
(as you reported initially).
/heLen