tn04462 Posted April 28, 2012 Share Posted April 28, 2012 (edited) 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 April 28, 2012 by tn04462 Link to comment Share on other sites More sharing options...
tn04462 Posted April 29, 2012 Author Share Posted April 29, 2012 >"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 Link to comment Share on other sites More sharing options...
tn04462 Posted April 29, 2012 Author Share Posted April 29, 2012 is it possible to select a subquery? i can't find any post that had an example . any help please? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now