Compilation errors?

Post Reply
chand012
Posts: 70
Joined: Mon Dec 18, 2000 4:34 pm

Compilation errors?

Post by chand012 »

Sometimes, when I edit a script, save, and try to run it from the command line, it fails with the follwing errors:

Texis Web Script (Vortex) Copyright (c) 1996-2000 Thunderstone - EPI, Inc.
Commercial Version 3.01.959738425 of May 30, 2000 (sparc-sun-solaris2.5.1)

000 scripts/create_newdbnotes: Login failure in the function permstexis
000 scripts/create_newdbnotes: Could not connect to /usr/local/morph3/texis/testdb in the function openntexis

However, when I compile it first with texis -C it runs fine. What's up?
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

Compilation errors?

Post by Kai »

How exactly are you running it from the command line, ie. what options? Does the script use modules?
chand012
Posts: 70
Joined: Mon Dec 18, 2000 4:34 pm

Compilation errors?

Post by chand012 »

No modules. Command line: texis -u _SYSTEM -p 'xxxxxxxxxx' -r scripts/create_newdbnotes
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

Compilation errors?

Post by Kai »

SQL statements in the script are checked for syntax at compile time. This uses the database, user and password specified on the command line, if any. Thus your -u/-p user/pass was used for the auto-compile after your edit, and it apparently failed for the default database. Your -C compile, which didn't give -u/-p, used PUBLIC.

Either create that login in /usr/local/morph3/texis/testdb, or always compile with -C first (and no user/pass), or remove the -u/-p from your command line run (perhaps use <USER> and <PASS> in the script, after reading user/pass from a secure file).
chand012
Posts: 70
Joined: Mon Dec 18, 2000 4:34 pm

Compilation errors?

Post by chand012 »

I think perhaps my problem was that there was no <DB = > line in the script and I did not use the -d option at the command line. Checking my command history again I see that I had errors even after compiling, without -d; then I ran successfully with -d. My bad. Thanks for the info.
Post Reply