Newbie



I have imported my sample (.vbs) script into Access' Visual Basic Editor, and
ran as is (see script below post). Errors came up...the first of which
stated "Compile error: Invalid outside procedure", so I looked it up in the
Help section and added "Property" to second line (of the actual script, under
header), and ran again...then an error stated "Compile error: Argument
required for Property Let or Property Set", but I did not understand this
Help section. The "=" was highlighted on the second line of script, in this
instance.

I searched the Help for "VBScript" and found that it is somehow differenct
scripting language than VBA (based on this ADO). I do not know what "ADO" is
and therefore, how to incorporate it into a VBScript.

Can anyone please look at my sample script below and help me to adjust so
that I can run the outside process from within Access (2003)?

Script starts below:

' ---------------------------------------------------------------------------
' TabletoFeatureClass.vbs
' Created on: Tue Jan 22 2008 12:22:58 PM
' (generated by ArcGIS/ModelBuilder)
' ---------------------------------------------------------------------------

' Create the Geoprocessor object
set gp = WScript.CreateObject("esriGeoprocessing.GPDispatch.1")

' Load required toolboxes...
gp.AddToolbox "D:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management
Tools.tbx"


' Local variables...
Well_test = "D:\test\Well_Annotation.mdb\Well_test"
XYWells = "D:\test\Well_Annotation.mdb\XYWells"
XYWells_end = "D:\test\Well_Annotation.mdb\XYWells_end"
XYWells_Layer = "XYWells_Layer"

' Process: Copy Rows...
gp.CopyRows_management Well_test, XYWells, ""

' Process: Make XY Event Layer...
gp.MakeXYEventLayer_management XYWells, "EASTING", "NORTHING",
XYWells_Layer,
"PROJCS['NAD_1983_StatePlane_Texas_North_FIPS_4201_Feet',GEOGCS['GCS_North_American_1983',DATUM['D_North_American_1983',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Lambert_Conformal_Conic'],PARAMETER['False_Easting',656166.6666666665],PARAMETER['False_Northing',3280833.333333333],PARAMETER['Central_Meridian',-101.5],PARAMETER['Standard_Parallel_1',34.65],PARAMETER['Standard_Parallel_2',36.18333333333333],PARAMETER['Latitude_Of_Origin',34.0],UNIT['Foot_US',0.3048006096012192]];IsHighPrecision"

' Process: Copy Features...
gp.CopyFeatures_management XYWells_Layer, XYWells_end, "", "0", "0", "0"
--
Barry Guidry
.



Relevant Pages

  • Re: Ping Steve Yandl or other VBScript gurus
    ... post on the vbscript newsgroup and that got me going in the right direction. ... 'Run macro named createResumeFromFile, which has no arguments, and catch its ... 'Exit the script with the value of the return code from the macro/function. ... how to do what I want to do entirely in VBA or VBScript; ...
    (microsoft.public.word.vba.general)
  • Re: LDAP query information
    ... execution of the vbscript? ... The error message indicates the line number in the script, ... Dim strBase, strFilter, strAttributes, strQuery, adoRecordset ... ' Construct LDAP syntax query. ...
    (microsoft.public.windows.server.scripting)
  • Re: Thank you Richard, Paul and urkec
    ... only built-in way to communicate with the person running the script is ... It is documented in the VBScript help file Script56.chm. ... You can use the ADO and ADOX objects to analyze and manipulate an existing ... dir cmd of each folder to a text file and have my script use that file ...
    (microsoft.public.scripting.vbscript)
  • Re: Ping Steve Yandl or other VBScript gurus
    ... Steve Yandl suggested using VBScript when I asked ... I'm trying to add one small wrinkle to the script and can't figure ... The macro that I am launching from the VBScript is ... be that 'dim bWaitOnReturn' didn't define the variable as Boolean but ...
    (microsoft.public.word.vba.general)
  • Re: ado connection.execute "syntax error"
    ... if I comment out the execute line the script completes with no errors. ... It's a vbscript compilation error, ... Server or ADO error. ... "rset" is the name of a VBA method. ...
    (microsoft.public.scripting.vbscript)