You are not retieving any data from the database so you have nothing to be saved. Change "DatabaseSetSQLSelect sql" in your script to "DatabaseRetrieve SQL, rows" Also note that DatabaseDescribe describes the result set definition (e.g. column definitions), not the data. : Greetings - : I'm running on NT 4.0 (SP 4) and don't seem to be able to get the : DatabaseSave to work. I know that the buffer is filled with data because I : can do a DatabaseDescribe and then view it using the MessageBox. I've : tried many different file formats (TXT, CSV, etc.) and a 0K file just gets : created. : Any ideas? : Attached is the code. Thanks. : Derek : Dim SQL, string : Dim rows, number : Dim problem, boolean : Dim message, string : Dim resultset, string : // Load file : FileReadAll( "C:\\Program Files\\24x7 Scheduler 2.0\\test.sql", SQL : ) : DatabaseConnect( "oadd" ) : DatabaseSetSQLSelect sql : //DatabaseRowCount rows : DatabaseDescribe resultset : MessageBox resultset : DatabaseDisconnect : // Save retrieved data in the temporary file : DatabaseSave( "C:\\temp\\message.csv", "CSV", rows ) : // Read temp. file contents an then then email to DBA : FileReadAll( "C:\\temp\\message.csv", message )
|