Page 1 of 1

Create a new database

Posted: Tue May 14, 2013 9:35 am
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

Re: Create a new database

Posted: Tue May 14, 2013 11:47 am
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.

Re: Create a new database

Posted: Wed May 15, 2013 12:32 am
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

Re: Create a new database

Posted: Wed May 15, 2013 12:56 am
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.