sabhazi Posted April 9, 2011 Share Posted April 9, 2011 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) Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 9, 2011 Share Posted April 9, 2011 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 Link to comment Share on other sites More sharing options...
sabhazi Posted April 18, 2011 Author Share Posted April 18, 2011 Thanks for the reply.just in .txt of .csvThe 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? Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 18, 2011 Share Posted April 18, 2011 So which of the standard methods for a recordset object did you decide to use? Perhaps some tutorial help with recordsets? 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 Link to comment Share on other sites More sharing options...
sabhazi Posted April 20, 2011 Author Share Posted April 20, 2011 Don't know. I gonna read the tuto first.thxSo which of the standard methods for a recordset object did you decide to use? Perhaps some tutorial help with recordsets? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now