Re: "load from" and stored procedures
Posted in 2000
Kate Juliff wrote: > I do not want to load from the client. I need the stored procedure to > import data from an ascii delimited file that resides on the server, > into a db that also resides on the server. But I need to initiate this > FROM the client. > > On the server I have a program (ESQL C) that reads Cisam files and > loads them into the database. The Cisam files and the db are on the > server. All works fine. HOWEVER I cannot get the program to run unless > I initiate it on the server. I've tried running it using a system call > from a stored procedure. No go. > > So I removed the code that loads the table from the program and just > had it write to an ascii delimited file, hoping to be able to load from > it as the next step. Can't do that either. The part that writes the > file works OK. > > My problem is not getting the data from the Cisam files into the db, > but getting all this initiated from a client. Any suggestions welcome. > And yes, I'm passing across and setting up the environment variables, > > Kate Create a Shell script on the Server that can load the file into the database when running under cron (this confirms that Environment variables are being set correctly in the script). Then, call this script from your Stored Procedure using the SYSTEM command. Rudy