Bendo Posted October 4, 2011 Share Posted October 4, 2011 Hi all, I'm trying to get a column of data from MS SQL and stick it into an array. I've tried various solutions from the forum but I can't quite seem to crack it. Also pretty new to all this but here is what I've got. $sqlCon = ObjCreate("ADODB.Connection") $sqlCon.Open("Provider=SQLOLEDB;Data Source=server;Database=master;User ID=helpdesk;Password=password;") Global $array $array = $sqlCon.execute("select loginname from master..syslogins WHERE isnumeric(loginname) = 1 order by loginname") MsgBox(0,"results", $array) No errors but no data either. Also on the server, the login used does return data, two entries in one column. Any cluesticks welcome... Link to comment Share on other sites More sharing options...
JoHanatCent Posted October 4, 2011 Share Posted October 4, 2011 If the answer is an array you need to look at: _ArrayDisplay Link to comment Share on other sites More sharing options...
ChrisL Posted October 4, 2011 Share Posted October 4, 2011 Look at the SQL link in my signature below [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Zedna Posted October 4, 2011 Share Posted October 4, 2011 Look here for simple example Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Bendo Posted October 5, 2011 Author Share Posted October 5, 2011 Thanks all, working now... dunno I was doing some silly typo's or not having the correct syntax. I have used bits from your examples and is a great resource. Thanks again. 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