Link to home
Start Free TrialLog in
Avatar of hellblazeruk
hellblazeruk

asked on

dbisql

Hi,
I have a sql query that works in Interactive SQL, I would like to automate the query so I can the results in a file at the same time each day using dbisql.

I have the batch file (export.bat)
REM Generate File

d:
cd \Export\

dbisql -q SalesExport1.sql

REM End of Script

When I run this I get the error
Unable to open database connection.
[Sybase][ODBC Driver][SQL Anywhere]Database server not found[Sybase][ODBC Driver
][SQL Anywhere]Database server not found

SalesExport1.sql
//Import Routine

connect custom identified by custom;

SELECT item…………………….


I have tried these two connection also:

dbisql.exe "UID=custom;PWD=custom";
CONNECT
USING 'UID=custom;PWD=custom;DBN=micros';

I am running Interactive SQL Version 11.0.1, build 2596

What should the connection string be?
Avatar of Dany Balian
Dany Balian
Flag of Lebanon image

try this: 'DSN=micros;UID=custom;PWD=custom'
SOLUTION
Avatar of wilcoxon
wilcoxon
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
and also a side note, if you're using odbc, you have to make sure that you have an odbc data source named micros that has your server name in it
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hellblazeruk
hellblazeruk

ASKER

Thanks Wilcoxon, just need to adjust your solution.