Jump to content

Recommended Posts

Posted

So SAD ! not only Execute method of ADODB.Connection doesn't work . but also Execute method of ADODB.Command !

I think There is no ANY easy way to slove except the AUTOIT TEAM fix the COM Byref Issue .

Give Up in This problem AGAIN !But  Thank U @mLipok

Posted (edited)

I am using the example au3 you made “thank you for that”. And I am entering all the info using MySQL and it’s not working. The driver is downloaded and working however I am getting a connection problem listed below.

 

 

$oADO_Error.description is:     [MySQL][ODBC 5.3(a) Driver]Can't connect to MySQL server on '206.72.206.123' (10060)
$oADO_Error.windescription:     Exception occurred.

$oADO_Error.number is:  80020009
$oADO_Error.lastdllerror is:    0
$oADO_Error.scriptline is:  970
$oADO_Error.source is:  Microsoft OLE DB Provider for ODBC Drivers
$oADO_Error.helpfile is:    
$oADO_Error.helpcontext is:     0
###############################
###############################
ADO.au3 v.2.1.13 BETA (970) : ==> COM Error intercepted !
$oADO_Error.description is:     [MySQL][ODBC 5.3(a) Driver]Can't connect to MySQL server on '206.72.206.123' (10060)
$oADO_Error.windescription:     Exception occurred.

$oADO_Error.number is:  80020009
$oADO_Error.lastdllerror is:    0
$oADO_Error.scriptline is:  970
$oADO_Error.source is:  Microsoft OLE DB Provider for ODBC Drivers
$oADO_Error.helpfile is:    
$oADO_Error.helpcontext is:     0
###############################
###############################
ADO.au3 v.2.1.13 BETA (970) : ==> COM Error intercepted !
$oADO_Error.description is:     [MySQL][ODBC 5.3(a) Driver]Can't connect to MySQL server on '206.72.206.123' (10060)
$oADO_Error.windescription:     Exception occurred.

$oADO_Error.number is:  80020009
$oADO_Error.lastdllerror is:    0
$oADO_Error.scriptline is:  970
$oADO_Error.source is:  Microsoft OLE DB Provider for ODBC Drivers
$oADO_Error.helpfile is:    
$oADO_Error.helpcontext is:     0
###############################

 

 


The url is Rsbot.cu.ma or ip 206.72.206.123, I have checked it is on port 3306

Here is the sql config section from the examples

 

Func _Example_MySQL()
    ; Link to Windows MySQL ODBC drivers
    ; https://dev.mysql.com/downloads/connector/odbc/

    Local $sDriver = 'MySQL ODBC 5.3 ANSI Driver' ; 'MySQL ODBC 5.3 UNICODE Driver'
    Local $sServer = '206.72.206.123' ; change this string to YourServerLocation
    Local $sDatabase = 'rsbotcum_rsbot' ; change this string to YourDatabaseName
    Local $sPort = '3306' ; change this string to If your Server use non standard PORT
    Local $sUser = 'XXXXXXXX' ; change this string to YourUserName
    Local $sPassword = 'XXXXXX' ; change this string to YourPassword

    ; Local $sConnectionString = 'Driver={' & $sDriver & '};SERVER=' & $sServer & ';PORT=' & $sPort & ';DATABASE=' & $sDatabase & ';User=' & $sUser & ';Passwd=' & $sPassword & ';'
    Local $sConnectionString = _ADO_ConnectionString_MySQL($sUser , $sPassword , $sDatabase, $sDriver , $sServer , $sPort )

    _Example_1_RecordsetToConsole($sConnectionString, "SELECT * FROM city ")
    _Example_2_RecordsetDisplay($sConnectionString, "SELECT * FROM country WHERE Continent = 'Europe'")
    _Example_3_ConnectionProperties($sConnectionString)

EndFunc    ;==>_Example_PostgreSQL

 

Edited by ronmage
Posted (edited)

This is not good point to post UserName and Password over the Internet.
I store it for testing.

Please edit your post and remove this info with XXXXXX sign.
And next time if you want to trust somebody (Thanks) and give to him password do it via PM not in open forum.

Of course rest of your question is properly posted (to the forum not via PM - exactly as Forum Rules says )

 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 4/7/2016 at 8:55 PM, ronmage said:

It was a free web host so I did not care much but it is fixed

Expand  

Not at all. Check again.

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

You can also try to install MySQL Workshop 

Then you can see that SQL return 10061:
http://dev.mysql.com/doc/refman/5.7/en/can-not-connect-to-server.html

  Quote

The error (2003) Can't connect to MySQL server on 'server' (10061) indicates that the network connection has been refused. You should check that there is a MySQL server running, that it has network connections enabled, and that the network port you specified is the one configured on the server.

Expand  

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

btw.
According to: http://serverfault.com/questions/137418/remote-mysql-connection-fails-10060

I just try 
telnet 206.72.206.123 3306

with no success.

so it is problem related to your network setting on MySQL Server or user/account config.

 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

@ronmage did you solve your problem ?

Is my tips have proved useful?

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

I'd like to use this to speed up things a bit for when I need to rebuild computers.

I have a spreadsheet that has the computer name and a software ID.

Instead of having to open that spreadsheet and look up the computer so I can get the software ID to re-install the software.  I would like to use ADO to search and return the value for me.

 

I have so far gotten nowhere with it, using the included _example_msexcel() only the connection properties seems to show the first two tasks to show records do not do anything, and even the default setting for $FileFullPath that says it should open the fileopen dialog that does not work either.

 

Not sure if this is a Windows 10 issue, an Autoit Version issue, or something else entirely.

 

Posted (edited)

Please make copy of this spreadsheets. And remove any "sensitive" data but please leave headers unchanged.
After that post it here.

 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
Func _Example_MSExcel()

    Local $sFileFullPath = @ScriptDir & '\ADO_CAD.xlsx' ; Here put FileFullPath to your Access File or use Default to open FileOpenDialog
    Local $sProvider = 'Microsoft.ACE.OLEDB.12.0'
    Local $sExtProperties = Default
    Local $HDR = Default
    Local $IMEX = Default

    Local $sConnectionString = _ADO_ConnectionString_Excel($sFileFullPath , $sProvider, $sExtProperties, $HDR, $IMEX)

    _Example_2_RecordsetDisplay($sConnectionString, "select * from [Sheet1$]")

EndFunc   ;==>_Example_MSExcel

But you must install driver for this provider - this was discussed in the following thread:

 

 

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

So is it works ?

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

No, its just as I said in my first post.  It is not working at all with any of the code that should be finding data from the spreadsheet.

In the example there are 3 tasks.

 

-RecordsetToConsole: No Error, No values

-RecordsetDisplay: No Error, No values, No Display

-ConnectionProperties: Array Display of all the connection properties shows up on screen.

Row|Name|Type|Value|Attributes
[0]|Current Catalog|8||513
[1]|Active Sessions|3|128|513
[2]|Asynchable Commit|11|False|513
[3]|Catalog Location|3|1|513
[4]|Catalog Term|8|Database|513
[5]|Column Definition|3|1|513
[6]|NULL Concatenation Behavior|3|2|513
[7]|Data Source Name|8|True|513
[8]|Read-Only Data Source|11|False|513
[9]|DBMS Name|8|MS Jet|513
[10]|DBMS Version|8|04.00.0000|513
[11]|GROUP BY Support|3|4|513
[12]|Heterogeneous Table Support|3|2|513
[13]|Identifier Case Sensitivity|3|8|513
[14]|Maximum Index Size|3|255|513
[15]|Maximum Row Size|3|4049|513
[16]|Maximum Row Size Includes BLOB|11|False|513
[17]|Maximum Tables in SELECT|3|0|513
[18]|Multiple Storage Objects|11|False|513
[19]|Multi-Table Update|11|True|513
[20]|NULL Collation Order|3|4|513
[21]|OLE Object Support|3|1|513
[22]|ORDER BY Columns in Select List|11|False|513
[23]|Prepare Abort Behavior|3|1|513
[24]|Prepare Commit Behavior|3|2|513
[25]|Procedure Term|8|STORED QUERY|513
[26]|Provider Name|8|MSJETOLEDB40.DLL|513
[27]|OLE DB Version|8|02.10|513
[28]|Provider Version|8|04.00.9756|513
[29]|Schema Term|8|Schema|513
[30]|Schema Usage|3|0|513
[31]|SQL Support|3|512|513
[32]|Structured Storage|3|9|513
[33]|Subquery Support|3|63|513
[34]|Isolation Levels|3|4096|513
[35]|Isolation Retention|3|9|513
[36]|Table Term|8|Table|513
[37]|User Name|8|Admin|513
[38]|Pass By Ref Accessors|11|False|513
[39]|Transaction DDL|3|16|513
[40]|Asynchable Abort|11|False|513
[41]|Data Source Object Threading Model|3|1|513
[42]|Output Parameter Availability|3|1|513
[43]|Persistent ID Type|3|4|513
[44]|Multiple Parameter Sets|11|True|513
[45]|Rowset Conversions on Command|11|True|513
[46]|Multiple Results|3|0|513
[47]|Provider Friendly Name|8|Microsoft OLE DB Provider for Jet|513
[48]|Alter Column Support|3|36|513
[49]|Open Rowset Support|3|2|513
[50]|Cache Authentication|11|True|513
[51]|Encrypt Password|11|False|513
[52]|Mask Password|11|False|513
[53]|Password|8||1537
[54]|User ID|8|Admin|1537
[55]|Data Source|8|True|1537
[56]|Window Handle|3|0|1537
[57]|Mode|3|16|1537
[58]|Prompt|2|4|1537
[59]|Extended Properties|8|Excel 8.0;HDR=yes;IMEX=0|1537
[60]|Locale Identifier|3|1033|1537
[61]|Jet OLEDB:System database|8||1537
[62]|Jet OLEDB:Registry Path|8||1537
[63]|Jet OLEDB:Database Password|8||1537
[64]|Jet OLEDB:Engine Type|3|35|1537
[65]|Jet OLEDB:Database Locking Mode|3|0|1537
[66]|Jet OLEDB:Global Partial Bulk Ops|3|2|1537
[67]|Jet OLEDB:Global Bulk Transactions|3|1|1537
[68]|Jet OLEDB:New Database Password|8||1537
[69]|Jet OLEDB:Create System Database|11|False|1537
[70]|Jet OLEDB:Encrypt Database|11|False|1537
[71]|Jet OLEDB:Don't Copy Locale on Compact|11|False|1537
[72]|Jet OLEDB:Compact Without Replica Repair|11|False|1537
[73]|Jet OLEDB:SFP|11|False|1537
[74]|Jet OLEDB:Compact Reclaimed Space Amount|3|0|513
[75]|Autocommit Isolation Levels|3|4096|513
[76]|Jet OLEDB:ODBC Command Time Out|3|0|1537
[77]|Jet OLEDB:Max Locks Per File|3|0|1537
[78]|Jet OLEDB:Implicit Commit Sync|11|False|1537
[79]|Jet OLEDB:Flush Transaction Timeout|3|0|1537
[80]|Jet OLEDB:Lock Delay|3|0|1537
[81]|Jet OLEDB:Max Buffer Size|3|0|1537
[82]|Jet OLEDB:User Commit Sync|11|True|1537
[83]|Jet OLEDB:Lock Retry|3|0|1537
[84]|Jet OLEDB:Exclusive Async Delay|3|0|1537
[85]|Jet OLEDB:Shared Async Delay|3|0|1537
[86]|Jet OLEDB:Page Timeout|3|0|1537
[87]|Jet OLEDB:Recycle Long-Valued Pages|11|False|1537
[88]|Jet OLEDB:Reset ISAM Stats|11|True|1537
[89]|Jet OLEDB:Connection Control|3|2|1537
[90]|Jet OLEDB:ODBC Parsing|11|False|1537
[91]|Jet OLEDB:Page Locks to Table Lock|3|0|1537
[92]|Jet OLEDB:Sandbox Mode|11|False|1537
[93]|Jet OLEDB:Transaction Commit Mode|3|0|1537

 

Also just concerned with stuff like this line:

Local $sFileFullPath = Default  ; Here put FileFullPath to your Access File or use Default to open FileOpenDialog

Should I not get a FileOpenDialog?  Because I never do, and again no error.  So I have tried default and also have tried to put in the full file path both the same results.

Posted

Show your script, or at least snippet.

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Nice ADO @mLipok ,
I wondered where can i find num rows and columns??

as finishing touch god created the dutch

Posted (edited)
Local $iColumnsCount = $oRecordset.Fields.Count
Local $iRowsCount = $oRecordset.RecordCount

https://msdn.microsoft.com/en-us/library/ms675841(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/ms676603(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/ms676763(v=vs.85).aspx

 

Edited by mLipok
typo in snippet

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...