Jump to content



Photo

selecting a sub query in autoit?


  • Please log in to reply
2 replies to this topic

#1 tn04462

tn04462

    Seeker

  • Active Members
  • 19 posts

Posted 28 April 2012 - 03:50 PM

i been trying to select a query in my script because it contains the modified version of the description from ms database but I can't run the query for some reason.

the query name : sub-desc2 - i've tried with and without brackets []
the field is: 8el

#include <access.au3>
$adSource = "data.accdb"
$oADO = _dbOpen($adSource)
$sQuery="select * from sub-desc2"

$result= $oADO.Execute($sQuery)
MsgBox(0,"",$result.Fields( "8el" ).Value )


$result= $oADO.Execute($sQuery)^error

Edited by tn04462, 28 April 2012 - 04:53 PM.






#2 tn04462

tn04462

    Seeker

  • Active Members
  • 19 posts

Posted 29 April 2012 - 04:43 PM

>"C:Program Files (x86)AutoIt3SciTE..autoit3.exe" /ErrorStdOut "C:Scriptsturbolisterpulldesc.au3"
We intercepted a COM Error!!
err.description is: Syntax error in FROM clause.
err.windescription is:
err.lastdllerror is: 0
err.scriptline is: 7
err.number is: 80020009
err.source is: Microsoft Office Access Database Engine
err.helpfile is:
err.helpcontext is: 5003131

C:Scriptsturbolisterpulldesc.au3 (8) : ==> Object referenced outside a "With" statement.:
MsgBox(0,"",$result.Fields( "8el" ).Value )
MsgBox(0,"",$result.Fields( "8el" )^ ERROR
>Exit code: 1 Time: 2.942

#3 tn04462

tn04462

    Seeker

  • Active Members
  • 19 posts

Posted 29 April 2012 - 05:50 PM

is it possible to select a subquery? i can't find any post that had an example . any help please?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users