Use of DAO database access object/SQL commands

This forum is for basic questions pertaining to the use of gINT Rules programming functions.

Use of DAO database access object/SQL commands

Postby shreker » Wed Aug 12, 2009 3:56 pm

Hi,

I was able to implement the add-in gINT Rules module GRA008 (to publish data on Google Earth) after a few modifications. However, later on, I decided to divide my POINT table into smaller 'child' tables with one-to-one relationships. Now, the procedure is not working. The problem, perhaps, is that the program is not able to retrieve co-ordinates (Latitude & Longitude) from the 'child' table and hence displays the error 'no plottable attributes'. It seems that the snapshot-type recordset object created in the procedure GoogleEarthPlotPointIDsErrorFn is making a copy from one table only - but I am not sure since I am not too familiar with the use of DAO objects. It seems like that the "sSql" string parameter defined and used as

sSql = "Select * " & "From POINT"
Set snPointIDs = gINTRules.CurrentProject.OpenRecordset(sSql, dbOpenSnapshot)

has something to do with the problem. If anybody has implemented this procedure, or has familiarity with SQL/database objects, Could you explain how this works?

I think I can solve the problem by copying the Latitude, Longitude fields back to the parent POINT table, but I would like to keep it within the child table. Also, I would not like to duplicate these fields in two different tables.

If anybody can enlighten me...

Will appreciate.

Shreker
shreker
 
Posts: 3
Joined: Mon Jul 27, 2009 1:31 pm

Re: Use of DAO database access object/SQL commands

Postby Pat Cummings » Thu Aug 13, 2009 3:23 pm

shreker, the ' sSql = "Select * " & "From POINT" ' section tells the gINT Rule to look in the POINT table. If you have moved the data you are selecting from POINT to a child table, you will need to change that code to select "From {the new table}".

You also have an additional gINT Rule function (gINTRules.GridData.ParentRecord) which can be used to pull the PointID data from the Parent table, POINT.
Pat Cummings
Training Manager
gINT Software
Pat Cummings
Site Admin
 
Posts: 207
Joined: Tue Aug 12, 2008 12:36 pm


Return to Basic Use of gINT Rules

Who is online

Users browsing this forum: No registered users and 2 guests