Script execution using ISQL

I am creating a simple isql script, but it does not work, and I need help to figure out what is wrong with it. I need to connect to a database and execute an SQL file. This is my script called script.sql:

CONNECT 'localhost:C:\Monde\Servidor\db\monde.fdb' USER 'SYSDBA' PASSWORD 'masterkey'; update usuario set senha = 'MYkWEn0kHLHHdm' where login = 'rose' 

When I try to connect to my database with:

 isql.exe -i script.sql 

I get the following message:

 Use CONNECT or CREATE DATABASE to specify a database Expected end of statement, encountered EOF 
+6
source share
2 answers

Ok, although I found out an old question how to do this, you just need to add the de -q parameter, for example:

 isql.exe -q -i script.sql 

A source:

ISQL Destructor.de help form

+5
source

Add a semicolon to the end of the UPDATE :

 CONNECT 'localhost:C:\Monde\Servidor\db\monde.fdb' USER 'SYSDBA' PASSWORD 'masterkey'; update usuario set senha = 'MYkWEn0kHLHHdm' where login = 'rose'; 
+4
source

Source: https://habr.com/ru/post/886897/


All Articles