Create a new database

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
Nicolas2121
Posts: 19
Joined: Fri Apr 12, 2013 11:00 am

Create a new database

Post by Nicolas2121 »

Hi,

I would like to know how to create a custom Databasein script in using assembly reference "System.Data.SqlServerCe".

I read on the forum script examples to connect and disconnect from a database, but none shows how to create a database.

Someone could help me or give me an example?

thank you very much

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Create a new database

Post by mark.monroe »

You should be able to create a database by using SQL and the "create table" command. The examples you found show you how to send SQL commands to the database that iX uses. You just need to send a different SQL command.

Note that the database gets destroyed every time you download a new project to the unit.

You could create another SQL compact database that is separate from the one iX Dev uses and place it in the Project Files directory of your project.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

Nicolas2121
Posts: 19
Joined: Fri Apr 12, 2013 11:00 am

Re: Create a new database

Post by Nicolas2121 »

Thanks for your answer.

So if I understand I do not have to create my Database with Ix software if it will be removed at each reload of the project?

What is the procedure to create an independent database that is not destroyed each reload?

Thanks

User avatar
Edmund
Posts: 92
Joined: Thu Nov 29, 2012 2:27 pm

Re: Create a new database

Post by Edmund »

We have slowed it by placing a database on a SD card.

Then it doesn’t matter if a user reloads the project from iX (and miss the question about overwrite) or a USB stick, and if the panel crash they can just move the card to a new panel.
Edmund Andersson

AITECH AB

Part of Beijer Integrator Group

Post Reply