Subject Re: [firebird-support] Confusing ISQL Error Messages
Author Helen Borrie
At 03:08 AM 23/04/2006, you wrote:
> Hello Again All:
>I'm getting the following error messages.
>I format and run ISQL from within a Liberty Basic program.
>The Liberty Basic Executable is in the following directory:
><c:\OFBG\PC>
>The Following statement is run from within the Liberty Basic program:
>I think you might be able to read it, if not I'll chop out the Liberty Basic
>but it might be relevant to my problem.
>Start of Liberty Basic Code:
>
>LinkParm$ = _
>"c:\Program Files\Firebird\Firebird_1_5\bin\" + _
>"isql.exe " + _
>"> RtISQLStdOutput.txt" + _
>" -m " + _
>"-ex " + _
>"-t " + chr$(34) + "%%" + chr$(34) + _
>" " + _
>chr$(34) + "c:\program files\firebird\firebird_1_5\examples\" + _
>"employee.fdb " + _
>"-u SYSDBA " + _
>"-p masterkey " + _
>chr$(34) + _
>" -o c:\RtIsqlSQLLog.txt"
>
>run LinkParm$
>End of Liberty Basic Code:
>Here are the ISQL Error Messages when I run the above:
>Note: they are the same messages I got when I tried to run an ODBC
>connection to the same database.
>I/O error for file "C:\OFBG\PC"
>-Error while trying to open file
>-Access is denied.
>Rick Note: This is the path where LibertyBasic.exe is located, not a file.
>
>Statement failed, SQLCODE = -902
>
>I/O error for file "C:\PROGRAM
>FILES\FIREBIRD\FIREBIRD_1_5\EXAMPLES\EMPLOYEE.FDB -U SYSDBA -P MASTERKEY"
>-Error while trying to open file
>-The system cannot find the file specified.

OK, this error is caused by passing a file spec containing a
space. You need to enclosed the entire connection path in quotes
(single quotes OK in the cmd.exe shell, double quotes needed in the
command.com shell, so use double quotes regardless!). And I mean,
double-quoting the **connection path string**, WITHIN the
double-quotes that Basic requires for strings.

Tip: in this particular example, replacing "\Program Files" with
"PROGR~01" would get you past this one.


>Statement failed, SQLCODE = -902
>
>I/O error for file "C:\OFBG\PC"
>-Error while trying to open file
>-Access is denied.

Now *this* message seems to suggest that you are running the Classic
server, not Superserver. In that case, you cannot use the IPServer
to connect. You must use the network transport. On a single-user
machine, this can be TCP/IP local loopback. The server name is
localhost and your connection string would be as follows (using the
Employee.fdb example) and all caps just to make it easier for you to see.

Note the double quotes - they are part of the string.

"LOCALHOST:C:\PROGRAM FILES\FIREBIRD\FIREBIRD_1_5\EXAMPLES\EMPLOYEE.FDB"

This syntax works for Superserver as well.

Alternatively, are you trying to use the embedded server? You can't
connect two applications simultaneously to that server. Embedded is
fine for deployment, but pretty much unusable for development and
experimentation.

./heLen