Moderators JLogan3o13 Posted January 7, 2013 Moderators Share Posted January 7, 2013 (edited) This is just a curiosity question; I've been playing with C# a little bit, with VS 2010 Express. I've taken a front-end I wrote in AutoIt, and am working through converting functions just to see what the translation looks like. One thing I have run into hurdles with is making a connection to and sending calls to a SQL database. I've been googling a bit, just thought I would ask here as well as I know many forum members work in other languages. Below is a snipped of the function in AutoIt, if anyone can nudge me in the right direction I would appreciate it. Connection $oLocator = ObjCreate("WbemScripting.SWbemLocator") $oSMS = $oLocator.ConnectServer($sServer, "root\sms\site_" & $SCode) If @error Then Exit MsgBox(0, "Sparrow SCCM Console", "Can't Connect") $oSMS.Security_.ImpersonationLevel = 3 $oSMS.Security_.AuthenticationLevel = 6 Sample Call $oResults = $oSMS.ExecQuery("SELECT * FROM SMS_Collection WHERE Comment LIKE '%License%' ORDER by Name") Edited January 7, 2013 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
cageman Posted January 7, 2013 Share Posted January 7, 2013 just a google search gave me this: http://msdn.microsoft.com/en-us/library/windows/desktop/aa393720%28v=vs.85%29.aspx Link to comment Share on other sites More sharing options...
danielkza Posted January 7, 2013 Share Posted January 7, 2013 You should also check LINQ to SQL. 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