AddLayerFromDatabase does not show dots

Hi

I have the strangest problem that has me baffled. Maybe someone on this group has had something similar.
I have an sql view that I use to load a shape file showing Incidents. I display the numshapes and it finds 4 shapes as expected but just shows no dots. I then chose another view that shows Accidents and it all loaded OK. I then made both these views identical, both looking at the Incidents table and the 1st View still does not show any shapes and the 2nd view (now exactly the same as the 1st view ie looking at the Incidents table and not the Accidents table) shows the 4 dots. I even changed the name of the first view as I thought it may be stored somewhere in memory but still no dots. So basically I change the SQL line in my code to read View 1 and no dots show. I change the SQL line to read View 2 and 4 dots show. Both views point to the exact same table and no other code is changed. Permissions on both views is identical

Hopefully someone can point me in the right direction - I am so desperate I would leave the view as View2 but this has to be used elsewhere when I restore it to read the Accidents.

I have loaded about 5 different shape files using SQL tables and have never had this problem

Regards

Colleen Crawford

Futher to this I have done the following:
Changed to a totally different view that places dots for Schools. So from the Schools checkbox if view is SchoolsShapeView dots load perfectly. If I change to IncidentsShapeView (which now has a select statement to the Schools Table exactly the same as SchoolsShapeView), no dots display (although it finds the shapes).
I then went to the Schools checkbox in a different application and did the same as the above with exactly the same results

This is so weird, not sure how on earth I am supposed to get around this

Hopefully someone can point me in the right direction as I have run out of options

Regards

Colleen

Hello Colleen.

If I’m understanding correctly, I wonder if it could be the rendering definition. Although they are using the same query (View), are the drawing options defined differently?

Regards,
Jerry.

Hi Jerry

All the code is exactly the same. All I do is change the view name in the Select statement. It is extremely frustrating. What I have done now is put the sql code into the vba code. So instead of selecting data from a view I have sql code in vba that does the same select/join as the view. This works fine. When I put the identical sql code into the view, once again no dots show. It is really confusing but at least for now I have managed to get around it. I do check and the view is showing the data and if I look at numshapes it has the shapes. I have about 5 other views that I use for the exact same thing and they work fine. The view joins the Incidents table to the Locations table to get the shape for the Location. I do the same thing with Accidents and this works fine. Very weird behaviour.

Regards

Colleen