danielcovington Posted January 20, 2013 Share Posted January 20, 2013 I have Created an Event Handler for ADO.CONNECTION the functions do fire but the strings contain gibberish. The Long and Int return okay. I have looked up the interface and they should be returning Wstrings.. First ANybody know what a Wstring is ?? Im assuming that it is a Wide String, and how could that be converted in Auto-It to a human readable string. Thanks for any help you can give. I am connecting to a SQL Server 2008 server but you can connect to anything to test I believe Below is the Function prototype givin by PowerBasic COM browser. WillConnect <6> (ByRef InOut ConnectionString As WString, ByRef InOut UserID As WString, ByRef InOut Password As _ WString, ByRef InOut Options As Long, ByRef InOut adStatus As Long, Byval pConnection As Int__Connection) #AutoIt3Wrapper_UseX64=n #include const $ConnInterface = "ConnectionEvents" $conn = ObjCreate("ADODB.Connection") $connEvent = ObjEvent($conn,"EVENTS_",$ConnInterface) if @error then Msgbox(0,"AutoIt COM Test", _ "ObjEvent: Can't use event interface '"& $ConnInterface &"'. Error code: " & hex(@error,8)) exit endif $conn.open ("Provider=SQLNCLI10;Server=ServerName;Database=Database;Uid=UID;pwd=pwd") $conn.close() Func EVENTS_ConnectComplete($ugh3,$ugh,$ugh1) MsgBox(0,"ADO EVENT","Connected to DataBase") EndFunc Func EVENTS_Disconnect($ugh4,$ugh5) MsgBox(0,"ADO EVENT","Disconnected from DataBase") endFunc Func EVENTS_WillConnect($ConnectionString,$val2,$val3,$val4,$val5,$val6) ConsoleWrite($ConnectionString&@CRLF&$val2&@CRLF&$val3&@CRLF&$val4&@CRLF&$val5&@CRLF&$val6&@CRLF) Msgbox(0,"Connection String",string($ConnectionString)) endFunc Link to comment Share on other sites More sharing options...
trancexx Posted January 21, 2013 Share Posted January 21, 2013 This was a bug. It was fixed August 21, 2012. Unfortunately the fix revealed another issue with internal variant string type, so I can't recommend going for beta for this. Make bug report if you don't mind and I will explain the issue furher for other developers in case development doesn't start while I'm around. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
danielcovington Posted January 21, 2013 Author Share Posted January 21, 2013 Bug report submitted.. Its not a big priority. Just would like it to work for future things Im working on. 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