Sign in to follow this  
Followers 0
Benoît

Access / QueryDef (s)

2 posts in this topic

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 ?

Share this post


Link to post
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...

Share this post


Link to post
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
Sign in to follow this  
Followers 0