Sign in to follow this  
Followers 0
sabhazi

SQL Stored procedure: result to file

5 posts in this topic

Hello,

I am busy with a script to run a sql 2005 stored procedure. The Result must be written to a file. How can i do this? See my small script till now.

Thx

Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc")

$sqlCon = ObjCreate("ADODB.Connection")
$sqlCon.ConnectionString = "driver={SQL Server};server=xxx;database=xxx;uid=sa;pwd=xxx"
$sqlCon.Open

$status = $sqlCon.State


$strSQL = "EzisDBSize"
$result = $sqlCon.execute ($strSQL)

Share this post


Link to post
Share on other sites



The returned $result is an ordinary RecordSet object with all the standard methods and properties of a recordset. What kind of records are expected in the result, and what kind of file did you want to save them in?

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Thanks for the reply.

just in .txt of .csv

The returned $result is an ordinary RecordSet object with all the standard methods and properties of a recordset. What kind of records are expected in the result, and what kind of file did you want to save them in?

:unsure:

Share this post


Link to post
Share on other sites

Don't know. I gonna read the tuto first.

thx

So which of the standard methods for a recordset object did you decide to use?

Perhaps some tutorial help with recordsets?

:unsure:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0