Subject Re: [IBO] IB_SQL: Problems executing script
Author Joe Martinez
> It's not valid to call CONNECT on a database to which you are already
> connected. Simply comment this out if you want to run the script while
> already connected - which you normally would be if you were running a DML
> script in IB_SQL.

That wasn't the problem. I was NOT already connected when I tried it. Pirtea was
correct. I needed to change CONNECT to CONNECT DATABASE. I guess that's a new
requirement since IB 5.6.

> >Ok. I found the source of the hanging problem. It was some incorrect
> >syntax in
> >my script. I had a statement like the following:
> >
> >update mytable set col1=col1a, set col2=col2a, set col3=col3a;
> >
> >The problem was the extra "set" words in there. Once I removed them, it
> >worked
> >fine. Still seems strange, though, that that would cause it to hang
> >instead of
> >giving an error message.
> It didn't hang: it was waiting for a COMMIT statement. See my previous
> comments about DML statements in scripts. That button which you referred
> to as "the check button" is the COMMIT button. You will continue to run
> into all sorts of problems until you decide for yourself a "standard" way
> to connect and run things, e.g.

I don't think that was the problem. As I said in my last post, I have a COMMIT
after EVERY SINGLE statement in my script. Anyway, if it was just waiting for a
commit, then clicking the "Commit" button should have taken care of it. It did
not. The only way that I was able to get it to not "hang" like that was to correct
my syntax on the update statement. As soon as I did that, it worked perfectly. If
my syntax was incorrect, though, I should have gotten an error message instead of
this situation.