var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Sp to write to a text file
Hi everyone -
running syabse asa7
i would like to write to a text file
when the procedure is called.
Is there a way to append a line of text
to a textfile from within sybase??
There is no direct way to write to a file from a stored proc (and that's a good thing, IMHO).
You can however do a couple of things:
You can use dbcc logprint or printtolog to write a message to the Sybase errorlog.
You can write an Extended Stored proc (that runs in the XP server), and have that write to the file.
You can maybe use the XFS extension which maps a directory as a table in Sybase.
asa7 allows writing to a file using re-directors.
SELECT 'HELLO iAnywhere' >># F:\\myfile.txt
Remember to call this within a stored proc, this construct should be part of EXEC IMMEDIATE and you can also supply variables.