ODBiC Discussion Board


RE: default.odb not found, R Zant, 09-11-2005

Okay, good idea

by Roger Harris, September 11, 2005 11:58

I'm a little reluctant to have it display a listing of the working directory. I know I said in the documentation you could use EXEC DIR as a quick way to find the working directory, but for a default template, CHDIR (with no parameters) will show the name of the current working directory without showing a listing. Also, I think it would be better to show this info only if the TRACE command is on. The "no template" mode was primarily intended for use by the UPDATEFORM and INSERTFORM commands (so you don't have to write a script to handle those), and both of those commands allow you to add the TRACE keyword to turn on tracing. (Or, even easier, you can just invoke "...odb.exe?trace=on" from a browser and it will execute the default template and show the working directory.) And it would be nicer to show a "no input" error if in_database or in_sql are not given. So, I've modified the internal template to have this at the beginning:

<% IF $trace$ %>
  <HTML><FONT color=red>No ODBdefault.odb found in working directory: <% EXEC CHDIR %><BR />
  Using internal template.<BR /></FONT>
<% ENDIF %>
<% IF NOT $in_database$ OR NOT $in_sql$ %>
  No script or SQL input specifed.
  <% EXIT %>
<% ENDIF %>
...
If anyone wants a copy of this version, send me an e-mail.

Replies:


Post Your Reply:

Name   
E-mail  optional
Topic  
Message:

HTTP Link: 
Link text: 


Copyright 1997-2003, Roger Harris. All rights reserved.