SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
DatabaseSave Not Working

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
DatabaseSave Not Working
Author Message
Derek Yung



Joined: 18 Apr 2000
Posts: 15

Post DatabaseSave Not Working Reply with quote


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 )

Tue Apr 18, 2000 10:14 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Re: DatabaseSave Not Working Reply with quote

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 )

Tue Apr 18, 2000 11:21 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.