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.