Jump to content

Access / QueryDef (s)


Recommended Posts

May any body can help me :

I want use AutoIt to use the method QueryDef. Can I do :

$adoCon = ObjCreate ("ADODB.Connection")

$adoCon.Open ("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & $<DataBase Name>)

$adoRs = ObjCreate ("ADODB.Querydef")

< How de define or/and change a query whose name is Req01 >

$adoCon.Close

Is it a good begining ?

How use and what the synthaxe the object ADODB.Querydef ?

Link to comment
Share on other sites

A solution is probably closed to :

$adoCon = ObjCreate ("ADODB.Connection")

$adoCon.Open ("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & $bdd)

$Numero = 123

$adoCommand = ObjCreate ("ADODB.Command")

$adoCommand.CommandText = "SELECT tableUn.numero FROM tableUn WHERE (((tableUn.numero)=" & $Numero & "))"

$adoCommand.Name = "req02"

;$adoCommand.CommandType = "adExecuteNoRecords" ; PROBLEM :-(

$adoCommand.Execute

$adoCon.Close

But it doesn't work anymore...

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...