Ok, I know this is a stupid newbie question, but I'm a stupid newbie,
so it fits.
I've got a query that writes a basic report, and I need to be able to
give it to a user who doesn't even know how to spell SQL to run.
Basically, I want her to be able to double click on a bat file on her
computer, and it'll produce an output file based on what the query
finds in the database.
I've got the query in a file with a .sql extension, and it runs fine in
Query Analyzer. I saw an old post when searching the google archives
for this newsgroup, which says to create a .bat file with a command in
the format:
isql -Usa -Ppassword -ic:\test.sql -oc:\test.log
That doesn't work, though. My output file ends up having the error:
DB-Library: Unable to connect: SQL Server is unavailable or does not
exist. Unable to connect: SQL Server does not exist or network access
denied.
Net-Library error 52: ConnectionOpen (Connect()).
I think I understand what the problem is, but I'm not sure what to do
about it. I'm not telling it where the SQL server is. I think the
previous conversation where I got this advice was assuming that this
would all be done on the same machine as the database, when I'm trying
to run this from just any generic PC on the same network as the
database server. How/where do I tell the bat file what server that I
want it to go to? Or am I completely off in thinking that's the
problem?
--Richard
so it fits.
I've got a query that writes a basic report, and I need to be able to
give it to a user who doesn't even know how to spell SQL to run.
Basically, I want her to be able to double click on a bat file on her
computer, and it'll produce an output file based on what the query
finds in the database.
I've got the query in a file with a .sql extension, and it runs fine in
Query Analyzer. I saw an old post when searching the google archives
for this newsgroup, which says to create a .bat file with a command in
the format:
isql -Usa -Ppassword -ic:\test.sql -oc:\test.log
That doesn't work, though. My output file ends up having the error:
DB-Library: Unable to connect: SQL Server is unavailable or does not
exist. Unable to connect: SQL Server does not exist or network access
denied.
Net-Library error 52: ConnectionOpen (Connect()).
I think I understand what the problem is, but I'm not sure what to do
about it. I'm not telling it where the SQL server is. I think the
previous conversation where I got this advice was assuming that this
would all be done on the same machine as the database, when I'm trying
to run this from just any generic PC on the same network as the
database server. How/where do I tell the bat file what server that I
want it to go to? Or am I completely off in thinking that's the
problem?
--Richard
Comment