Also, Ajay can put TEST.ASC in the DB as a VarChar and use the great RUN
SELECT which will negate all those problems with disk files.
----- Original Message -----
From: "A. Razzak Memon" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Sunday, November 01, 2009 12:29 PM
Subject: [RBASE-L] - Re: Rbase with PHP
At 11:51 AM 11/1/2009, [email protected] wrote:
I am a novice at PHP. Any Help is greatly appreciated. Here I go !
I am using PHP to insert a row in a Rbase Table which has an ON INSERT
TRIGGER defined.
The trigger in turn runs a externally saved command file named TEST.ASC.
When I execute
the PHP program it correctly inserts a row in the Rbase Table which fires
the trigger
but then I get the following error. (I am using Apache 2.2 as my web
server)
Warning: odbc_exec()
[<http://localhost/BerjeTest/function.odbc-exec>function.odbc-exec]: SQL
error: [RBTI][Oterro ODBC Driver]
[BDWeb]-ERROR- Unable to open file: test.asc (2583), SQL state HY000 in
SQLExecDirect in C:\Apache2.2\htdocs\BerjeTest\Insert.php on line 33
The database, the PHP program and the command file TEST.ASC are all in the
same folder under
htdocs folder.
I am assuming it is a security issue that prevents TEST.ASC from being
accessed but have no
idea what I am missing.
Ajay,
You will need to define the absolute path in your stored procedure to run
the
appropriate file (test.asc) in correct folder if the file is not in the
same
folder with the database.
Currently, the stored procedure is looking for the test.asc in the folder
with
the database files.
So, either you place the test.asc file in the same folder with the
database,
or define the absolute path in the Stored Procedure.
Hope that helps!
Very Best R:egards,
Razzak.