Database Wizard: Clicking Refreshand Shapes are swapping Identitie

B

BenMcD

Hi Everyone,

I'm currently developing a drawing that links to an access database, but
have run into an issue.

I have used the Database Wizard to create a linked drawing, using linked
shapes in a custom stencil to represent records in the database, so for
example, if I have 20 servers listed in the DB, I have 20 server shapes and
so on. Each set of records runs from a query in the DB, so I can have a
seperate icon for servers, firewalls etc, rather than one icon for every
record in the DB.

I have placed all of the linked shapes in the correct areas on the drawing,
but when I add, delete or amend a record on a database, when I click
'Refresh' on the Database Monitor, all of the shapes stay in the same place,
but the links move around. For example the server on the left becomes the
server on the right, and vice versa. The shapes themselves stay in the exact
same place, but seem to swap identities. In some cases, the new record takes
the place of an already placed shape and, an older record is placed at the
bottom of the drawing.

Can anyone help at all? I'm willing to try and suggestions you have!

Thank you,
Ben
 
F

Fred Diggs

Hum, its difficult to figure out just what what is happening here. I suggest
checking the following.

When you link shapes to database records using the database wizard, you
specify a field or fields that serve as the id for that record. The id value
is stored in the shape so that when you refresh the link to the database, the
saved id value is matched with a record in the database and the data from
that record is refreshed into the shape. Depending on the data, anything
could happen. For example, if you are linking to pin location information
stored in the database and that location changes in the database, the shape
will move on the page when the data is refreshed.
 
B

BenMcD

Thanks Fred, each of the DB records has three primary keys relating to the
shapes in Visio. I tried running a Database Update and also updating the
shapes manually before I clicked the 'Refresh' button on the Database
Monitor, but doesn't seem to sort it.

There's no pattern to where it's putting the records. You can't see that the
shapes have moved, as the icons are all static, but the records have swapped
around. Some go on the right, some on the left, in some cases, records that
were already on the drawing before the refresh appear at the bottom of the
screen where the new records should be displayed- the new records replace
them.

I'll keep trying, but does anyone have any more ideas?

Thanks so far,
Ben
 
B

BenMcD

Hi Everyone,

Had a Eureka! moment last night, nothing to do with Visio, it was the way
I'd organised the data in my database. Basically, it was sorting the records
by name and not ID field, so inserting records would put them at different
places in the table, rather than at the end. D'oh!

Thanks for your help,
Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top