dazza Posted December 11, 2008 Share Posted December 11, 2008 (edited) $sqlCon = ObjCreate("ADODB.Connection") $sqlCon.Open("Driver={SQL Server};Server=99.99.99.99;Database=inventory;Uid=id_name;Pwd=password;") $RS=$sqlCon.EXECUTE("SELECT * FROM tblClass WHERE intClassTypeId = 125") How do I put the results of the query into a string? Many thanks. Edited December 11, 2008 by dazza Link to comment Share on other sites More sharing options...
James Posted December 11, 2008 Share Posted December 11, 2008 You have. $RS now equals the value of the query you executed. ConsoleWrite($RS & @CRLF) Put that beneath the query. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
weaponx Posted December 11, 2008 Share Posted December 11, 2008 You have. $RS now equals the value of the query you executed. ConsoleWrite($RS & @CRLF) Put that beneath the query. This is way off. The Execute method returns a recordset object While Not $RS.EOF ConsoleWrite($RS.fields("column") & @CRLF);By column name ConsoleWrite($RS.fields(0) & @CRLF);By index $RS.MoveNext WEnd 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