Board index » delphi » Finding command-line tools for SQL Server 7 / 2000

Finding command-line tools for SQL Server 7 / 2000

Folks,

I need to call the command-line tool "ISQL.EXE" (or OSQL.EXE - which
is the more recent, more powerful one? Any reason to use one over the
other?) from an installation. I should be supporting both MS SQL
Server 7 and 2000.

In SQL Server 7, I can find the path where SQL is installed in the
registry HKLM\Software\Microsoft\MSSQLServer\Setup\SQLPath - and in
the "Binn" directory below that path, I'll find the ISQL.EXE and
OSQL.EXE (which I can call from my install app).

HOWEVER: in SQL Server 2000, this seems to be no longer the case! Even
though I find the very same entry, and it points to
u:\dev\sql2000\mssql, the ISQL.EXE and OSQL.EXE are nowhere to be
found in that directory and any directory below that ..........
they're in c:\program files\microsoft  SQL Server\80\Tools\Binn !!

I never specified that directory when installing SQL Server 2000, and
I can't find any mention of that directory in the registry either, so
how on earth am I supposed to find the ISQL.EXE file? Any ideas?

Thanks!
Marc

------------------------------------------------------------------------
Marc Scheuner                                          Software Engineer
FastLane Technologies Inc.                  Halifax, Nova Scotia, Canada
Email: mscheu...@fastlane.com                    http://www.fastlane.com

 

Re:Finding command-line tools for SQL Server 7 / 2000


You should always use osql, it uses ODBC, isql uses dblib and is for back
compat only.

The tools should be on the path but if you need to find them a supported way
would be to pick one of the COM libraries and then go look it up in the
registry to find where the .dll is. SQLDMO, DTSPKG or similar would be a
good choice. These are in the same place as the exe's

-Euan

Quote
"Marc Scheuner" <mscheu...@no.spam.for.me.ca> wrote in message

news:a2q1ctsh03um93hvd5s2u5octums0eol11@4ax.com...
Quote
> Folks,

> I need to call the command-line tool "ISQL.EXE" (or OSQL.EXE - which
> is the more recent, more powerful one? Any reason to use one over the
> other?) from an installation. I should be supporting both MS SQL
> Server 7 and 2000.

> In SQL Server 7, I can find the path where SQL is installed in the
> registry HKLM\Software\Microsoft\MSSQLServer\Setup\SQLPath - and in
> the "Binn" directory below that path, I'll find the ISQL.EXE and
> OSQL.EXE (which I can call from my install app).

> HOWEVER: in SQL Server 2000, this seems to be no longer the case! Even
> though I find the very same entry, and it points to
> u:\dev\sql2000\mssql, the ISQL.EXE and OSQL.EXE are nowhere to be
> found in that directory and any directory below that ..........
> they're in c:\program files\microsoft  SQL Server\80\Tools\Binn !!

> I never specified that directory when installing SQL Server 2000, and
> I can't find any mention of that directory in the registry either, so
> how on earth am I supposed to find the ISQL.EXE file? Any ideas?

> Thanks!
> Marc

> ------------------------------------------------------------------------
> Marc Scheuner                                          Software Engineer
> FastLane Technologies Inc.                  Halifax, Nova Scotia, Canada
> Email: mscheu...@fastlane.com                    http://www.fastlane.com

Other Threads