Nova Explorer and MySql scripting sample

by Frédéric Colin 7. November 2009 23:34

Last week during Batimat, I was discussing about Nova Explorer scripting capabilities with a partner. The need was to connect to MySql for displaying a scene panel filled with data from this database engine. The data panel should only be visible on user interactions, one for each object. Well, it's possible and that's what i'm gonna show you in this post!

First of all, I used MySql 5.1.40 community edition. You can download it here. Next, you may wonder how to access this kind of database through Nova Scripting Editor. In fact it's quite simple if you download this connector (Connector/ODBC - MySQL ODBC driver). Moreover, if like me you're not fond of command lines, you should also download this application to administer your MySQL server. Trust me, it's very useful!

You certainly know that Nova range is developped with Microsoft .NET technologies and you may wonder why I used an ODBC Connector in VB.NET instead of a native provider like this one (MySQL Connector/Net — for connecting to MySQL from .NET). That's a good question. In fact, you have to know that Nova Explorer generate a new assembly on the fly and compile it from your VB.NET code. That why you can't dynamically add a reference to a new Assembly. We've just added by default all the necessary references from the Framework .NET. But if you develop a plugin instead of a script, it will be possible to use native .NET connector since you decide in Visual Studio project to add or not a specific reference to an assembly. I will talk about plugin development in another post.

So, here the scene I used. I apologize for the ugliness of the scene but I'm not a designer (thank you Mitch for your help).

Then I added user interactions on each object to display data from MySql database:

You enjoyed this post and you want to know more? Following the next issue ...

Add comment




biuquote
  • Comment
  • Preview
Loading




Disclaimer
The opinions expressed herein are the author own personal opinions and do not represent their employers' view in anyway..

© Copyright 2012 Nova by Vertice Team