Hi Max, Max [mailto:[EMAIL PROTECTED] wrote: > Subject: Re: loadercli shows *no line numbers* for syntax > error messages > i n dbprocs > > Two questions : if loadercli is not an SQL tool, > which tool should I be using (on linux) to devellop my stored procs ? > > I just need some tool to take a file filled with stored procs > run it, and give me a line number for the syntax errors. > Well, ok ok ok the Loader is not an SQL tool but can definitely be improved (still) ;-). It was initially designed to load and unload data and to transform it in between. But because a table can only be loaded/unloaded if it exists it has the simple functionality of sending SQL statements to the kernel. Thus any SQL statement executed with the Loader will simply return OK or error (and some error message in the latter case). But don't expect any result from execution of SQL statements. It wouldn't be too much work to give the line number and char pos in case of errors in SQL statements or db procs. But until now there was no need ...
> loadercli seems to be the closest to this, but would it make more > sense to 'enhance' ireport.py to 'feed' from files ? > That would be an option. Another one would be using SQL Studio. No? > Please tell me, and I'll go agead and implement it, > also by looking at loadercli's source, it wasn't immediately > clear where the best place would be to add this, so > a hint on this would be helpfull. > Hmm, it's not that transparent? Function ls13ExecExtSQLStmt in vls13.cpp could be modified to do the job. Thats the one that gets the command from the 'dispatcher' for execution and sends it to the kernel. The return value from ls03ProcessSQLPacket inside ls13ExecExtSQLStmt needs to be checked and the command parsed in case of error to report the exact error position. I'd think that's it. Regards, Steffen -- Steffen Schildberg SAP DB Team SAP Labs Berlin _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
