fr33za Posted July 5, 2007 Share Posted July 5, 2007 hi made a script to get datas from my sql database. i'm very new on autoit. my SQL.au3 CODEFunc _SQLConnect($server, $db, $username, $password) Global $adCN ;<==Declare variable $adCN = ObjCreate("ADODB.Connection") ;<==Create SQL connection $adCN.Open ("DRIVER={SQL Server};SERVER=" & $server & ";DATABASE=" & $db & ";uid=" & $username & ";pwd=" & $password & ";") ;<==Connect with required credentials EndFunc ;==>_SQLConnect Func _SQLClose() $adCN.Close ;==>Close the database EndFunc ;==>_SQLClose Func _SQLExecute($query) $adCN.Execute($query) EndFunc ;==>_SQLExecute my getdata.au3 CODE#include <SQL.au3> $sqlCurrentGameID = "select * from guid"; _SQLConnect ( 'srv01', 'db2', 'sa', '' ); _SQLExecute ( 'SELECT * FROM guid' ); _SQLClose(); i searched in the forum how to show the results, but i didnt find anything that helped me. can anyone tell me how the print the results? in a messeage box or anything else =) Link to comment Share on other sites More sharing options...
randallc Posted July 6, 2007 Share Posted July 6, 2007 Hi, See helpfile for example scrips which write data to console; or put in Array (if not arready in array!) and see helpfile for _ArrayDisplay Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
fr33za Posted July 6, 2007 Author Share Posted July 6, 2007 hi i can't bring it to work with the SQL Example in the help file can anyone give me an example pls? ^^ Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 6, 2007 Share Posted July 6, 2007 i can't bring it to work with the SQL Example in the help file What the heck does THAT mean?You won't be able to write the script until you learn to use the functions. You won't learn to use the functions without experimenting with some examples.If you just want someone to write a script for you, see the Rent-a-Coder link in my sig, below.What we do here is help you learn to write it yourself. If you don't want to do that, you are in the wrong place... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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