Jump to content

Recommended Posts

Posted

This screenshot is come from ?

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)
  On 3/9/2016 at 11:21 PM, faustf said:

i try to use  your  ADO i  include in my new script  ADO.au3

Expand  

Why you are duplicating constants in your own script ?

You should use #include instead CopyPaste.

 

Edited by mLipok
typo

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

this is my script  

; Script Start - Add your code below here
#include <GUIConstants.au3>
;#include "ModernMenu.au3"
;#include "E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3" ; Only unknown constants are declared here
#include "include\ModernMenuRaw.au3" ; Only unknown constants are declared here
;#include "E:\_GESTIONALE_NEW\include\menu.au3" ; include i menu
#include "include\menu.au3" ; include i menu
#include "include\ADO.au3" ;  include function for adodb

#NoTrayIcon

Opt("GuiOnEventMode", 1)
Opt("GUICloseOnESC", 0)

_Gui()


Func _Gui()


    $hMainGUI = GUICreate("GesT", 1692, 808, 192, 114, BitOR($GUI_SS_DEFAULT_GUI, $WS_SIZEBOX, $WS_THICKFRAME))

    _Menu()  ; menu fico

    GUISetState(@SW_SHOW)

    GUISetOnEvent($GUI_EVENT_CLOSE, "_close")
    GUICtrlSetOnEvent($ExitItem, "_close")
EndFunc   ;==>_Gui

;_ConnectDB()



Func _close()

    Exit

EndFunc   ;==>_close

;===============================================================

;Keep the GUI alive

;===============================================================

While 1

    Sleep(1000)

WEnd

when  arrive  at  #include "include\ADO.au3"    give me  error

 

Posted

What you have inside of this:

#include "include\ModernMenuRaw.au3" ; Only unknown constants are declared here
#include "include\menu.au3" ; include i menu

 

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

Or better way to check :

just put 

#include <AutoItConstants.au3>

on the top of you main script.

And you will see first place where it is duplicated.

 

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
If Not IsDeclared("IDI_APPLICATION")        Then Global Const $IDI_APPLICATION = 32512
If Not IsDeclared("IDI_HAND")               Then Global Const $IDI_HAND = 32513
If Not IsDeclared("IDI_QUESTION")           Then Global Const $IDI_QUESTION = 32514
If Not IsDeclared("IDI_EXCLAMATION")        Then Global Const $IDI_EXCLAMATION = 32515
If Not IsDeclared("IDI_ASTERISK")           Then Global Const $IDI_ASTERISK = 32516
If Not IsDeclared("IDI_WINLOGO")            Then Global Const $IDI_WINLOGO = 32517

tell me  previusly declared as const  

how could  resolve ?? 

thankz  alot

Posted (edited)
  On 3/10/2016 at 12:12 AM, faustf said:
If Not IsDeclared("IDI_APPLICATION")        Then Global Const $IDI_APPLICATION = 32512
If Not IsDeclared("IDI_HAND")               Then Global Const $IDI_HAND = 32513
If Not IsDeclared("IDI_QUESTION")           Then Global Const $IDI_QUESTION = 32514
If Not IsDeclared("IDI_EXCLAMATION")        Then Global Const $IDI_EXCLAMATION = 32515
If Not IsDeclared("IDI_ASTERISK")           Then Global Const $IDI_ASTERISK = 32516
If Not IsDeclared("IDI_WINLOGO")            Then Global Const $IDI_WINLOGO = 32517

tell me  previusly declared as const  

how could  resolve ?? 

thankz  alot

Expand  

Just remove this lines and Use:
 

#include <AutoItConstants.au3>

as I suggested.

 

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

For posterity, as a reference.
Below an interesting topic for beginners on how to start using the UDF

 

 

 

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

new version:

2016/03/18 '2.1.13 BETA'
.   Changed: _ADO_COMErrorHandler - now showing also _ADO_UDFVersion()  - mLipok
.   New: Enums: $ADO_ERR_ISNOTREADYOBJECT - mLipok
.   Renamed: Function: __ADO_Connection_IsOpen >> __ADO_Connection_IsReady - mLipok
.   Changed: Function: __ADO_Connection_IsReady : new feature checking connection state and seting  $ADO_ERR_ISNOTREADYOBJECT - mLipok
.   New: Function: __ADO_Recordset_IsReady - mLipok
.           __ADO_Recordset_IsReady is a wrapper for __ADO_Recordset_IsValid
.               which also check for $oRecordset.state and set $ADO_ERR_ISCLOSEDOBJECT also $ADO_ERR_ISNOTREADYOBJECT
.           __ADO_Recordset_IsReady is now used in few functions which uses $oRecordset
.   Changed: Function: __ADO_Recordset_IsNotEmpty : now using __ADO_Recordset_IsReady instead __ADO_Recordset_IsValid - mLipok
.           as __ADO_Recordset_IsReady is wrapper for __ADO_Recordset_IsValid
.           so now __ADO_Recordset_IsNotEmpty checking old and new feature
.
.   !!!!!!!!!!!!!!!!!!!!!!!!
.   Renamed: _ADO_ERROR_Description >> _ADO_MSDNErrorValueEnum_Description
.   New: Function: _ADO_GetErrorDescription - mLipok
.   New: Function: _ADO_ConsoleError - mLipok

Download link

 

Today I noticed that providing version 2.1.12, I made a mistake and ZIP file contains version 2.1.10
Thus, in principle, so far only available version 2.1.11
I'm sorry for the mistake.

 

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

  • 3 weeks later...
Posted

@mLipok thanks for the great work on autoit UDF . i use this udf to access a sql server 8.0 database with UPDATE action .now i just want to know how can i get the affected_rows of the UPDATE action .

 I think this question may be not about this UDF but ADODB itself . 

I have try GOOGLE  but can't find any helpful information about autoit.

ANY HELP WILL BE GREAT . THANKS

 

Sorry for my bad English!

 

Posted

IMHO: Your English is better then mine .
I'll try to answer your question, as it is interesting also for me. Also I must say that there was a time (long time ago) when I asked to my self the same question, but I droped it then, so I think this is time to back to this.

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

Do you mean something like in this example ?

https://support.microsoft.com/en-us/kb/195048

 

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

It should already works:

Local $oCommand = _ADO_Command_Create($oConnection)
    _ADO_Command_Execute($oCommand, $sQUERY2)
    MsgBox(0, '', @extended)

unfortunately in the following topic you can read little about:

 

 

 

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

Thanks a lot!!

I can't believe you can find so many useful information in my sleeping 8 hours .

I will check it later and write  some proof code to post back here .

 

 

Posted (edited)

I was slept only 4 hours. But not because of your request, just have many things to do, with 30 servers.
I wake Up, and I have a "Glimpse of knowledge"

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

wow! 30 servers!how busy you‘re .

i have seen the posts and links you given.

does it means in VB ,  Execute method of ADODB.Connection accept secont parameter for return the attected rows number .

but in autoit , refer to this link: 

 

  Quote

Currently, ByRef values on COM object methods don't work out of the box. It's even hard to make them work at all.

Expand  

SO, EXECUTE method of ADODB.Connection doesn't work in AUTOIT with the second parameter .

 

BUT , EXECUTE method of ADODB.Command can work ,right?

Local $oCommand = _ADO_Command_Create($oConnection)
    _ADO_Command_Execute($oCommand, $sQUERY2)
    MsgBox(0, '', @extended)

 

 

with no time to wirte code due to busy working , will test it later and feed back .

Thank U !! Now I feel I found the right way to slove this problem . Hope So !!

 

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...