1

I would like to ask for some help on writing some VBscript (Supported in ArcPad) in a user form Command Button where the user activated the form with a unique feature ID(hence named COA_ID) already embeded, to query a data table which is embeded in the AXF file package in ArcPad 10.

The function of the command is basically displaying all records in the data table using the feature ID (COA_ID) as the P. Key. I do not know if a DSN should be established in the system to facilitate this.

Here's my alpha codes:

Option Explicit

Dim cnn
Dim rs

Dim sCOAID

Set cnn = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")

cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\saFlush_t2.axf"

''onFeatureChanged = Set sCOAID=ThisEvent.Object

'execute SQL Statements as below,

SQL_query = "SELECT * FROM saFlushing_relate,
      ORDER BY "COA_ID"",
Set rs = cnn.Execute(SQL_query)

RS.Show    

RS.Close
CN.Close

Arcpad 's scripting windows detects some syntax errors.

1

Your SQL_query should be like this,
SQL_query = "SELECT * FROM saFlushing_relate ORDER BY COA_ID"

| improve this answer | |
  • Thanks very much Klewis, Yes, I agree. I should have check the SQL syntax first. However, I am getting syntax error even on the first couple of statements, which only declaring variables by using "DIM".....just wondering if this is something to do with permissions? as I am currently do not have local WS admin rights..... – user1618516 Sep 20 '13 at 14:55
  • You have Option explicit enabled so you must dim all your variables before using them in the script. I do not see SQL_query dimmed. The exact error message would help. – klewis Sep 20 '13 at 15:12
0

Esri Technical Support advised me that you cannot directly query a data table embeded in a AXF package in ArcPad; simply because it's compressed.

| improve this answer | |
  • Welcome to GIS SE! Please note that you started to raise a new question about, I think, how to uncompress and access an AXF file package. Since this is the area reserved for answers I have deleted that and recommend you post that as a new question if it is not already answered here (or elsewhere). – PolyGeo Sep 24 '13 at 21:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.