Jump to content

Search the Community

Showing results for tags 'Sql query'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. I have been working on a project that pulls information from a sql database (Microsoft SCCM), and then presents a GUI to the end user to manipulate that data. On startup, the application pulls a list of collections of computers the user has access to. Currently I pull in a web report, save it as a .csv, and then convert the sheet to a 2d array. This works very well, but is a bit cumbersome. It adds 5-10 seconds onto the startup, which to the end user seems to be a lag, since I cannot create the GUI until this array is created. I can query the database directly, and get the same information far more quickly in just a few lines of code (see below). I'm just unsure how to easily convert this into a 2d array any other way than the Excel trick I am using above. From the Help file, _ArrayAdd is for a 1D array only. Am I overlooking something obvious, or is the Excel method the best option? I can easily pull the query, and use the $element.Name and $element.CollectionID properties, but would like to have them in an Array for use in the rest of the application. $sServer = "SCCMP02" $SCode = "P02" $oLocator = ObjCreate("WbemScripting.SWbemLocator") Global $oSMS = $oLocator.ConnectServer($sServer, "root\sms\site_" & $SCode) If @error Then MsgBox(0, "", "Can't Connect") $oSMS.Security_.ImpersonationLevel = 3 $oSMS.Security_.AuthenticationLevel = 6 $oResults = $oSMS.ExecQuery("SELECT * FROM SMS_Collection WHERE Comment LIKE '%Site License%' ORDER by Name") For $element In $oResults $name = $element.Name $colID = $element.CollectionID MsgBox(0, $name, $colID) Next
×
×
  • Create New...