Bendo 0 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... Share this post Link to post Share on other sites
JoHanatCent 13 Posted October 4, 2011 If the answer is an array you need to look at: _ArrayDisplay Share this post Link to post Share on other sites
ChrisL 13 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 Share this post Link to post Share on other sites
Zedna 282 Posted October 4, 2011 Look here for simple example Resources UDF ResourcesEx UDF AutoIt Forum Search Share this post Link to post Share on other sites
Bendo 0 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. Share this post Link to post Share on other sites