Hi i am trying to link graphical elements to the database using odbc connection.
Everything works fine in terms of text, but i need the level or colour of a specific element to go accross to the database and should change dynamically if i change a colour or level in the design.
Is this possible or not?
If so please explain
I am running microstation select series 2 on my pc
Read this article about MicroStation and databases. It mentions the Microsoft Data Access Components (MDAC), which are Microsoft COM libraries. Use MDAC to communicate between VBA and an external DB.
Download MDAC and install on your computer. In VBA, make a reference to MDAC so you can use the library in your code.
You will find plenty of information and examples of MDAC both in the documentation available from Microsoft and on the web.
If you read the above article you will know that the DatabaseLink attached to an element is minimal. It matches the element with a row in a table using the MSLink (row ID) and Entity Number (table ID). If you want to store other information in the database then you must write the appropriate SQL statements, fill the parameters with the right values, and update your DB via MDAC.
For example, the pseudo-code for adding an element's level to the DB would be something like this …
Regards, Jon Summers LA Solutions