Jump to content

selecting a sub query in autoit?


Recommended Posts

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
Link to comment
Share on other sites

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

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