zilot
February 6, 2010, 10:47am
1
Hello
Is it possible to create file oriented database model with VPSDE. For example not to use SQL, MYSQL etc… databases for data storing but files for data storing? Can SDE generate such database schema and all needed code for accessing cush schema (like in case of SQL)? I read manuals but didnt find it. Also what is Cache database in available databases? Please explain.
regards
zilot
Hi Zilot,
Thanks for your inquiry. I suggest you use HSQL or FireBird, which are file oriented databases.
Best regards,
Lilian Wong
Hi Zilot,
You are welcome. Please feel free to have a post again if you need any help.
Best regards,
Lilian Wong
zilot
February 17, 2010, 3:52pm
5
Hello Wong
I installed FireBird database server, and try to make some test application with it. I have problem to work with database in my code. I can connect to database through VP UI but when my program needs to connect there is an exception.
So, here I can connect to database
http://img11.imageshack.us/img11/8127/screenshot001vr.jpg
Then I can connect here too
http://img4.imageshack.us/img4/3713/screenshot002mu.jpg
I can create database schema from VP SDE UI
http://img683.imageshack.us/img683/908/screenshot003g.jpg
But when try to do that in my code I get exception
this is my main code
using Orm;
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace PLCController
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
try
{
ORMDatabaseInitiator.CreateSchema(PLCController.PLCControllerPersistentManager.Instance());
}
catch (Exception e)
{
MessageBox.Show(e.Message + System.Environment.NewLine + "in:" + System.Environment.NewLine + e.Source + System.Environment.NewLine + "StackTrace:" + System.Environment.NewLine + e.StackTrace, "Error");
return;
}
Application.Run(new PLCControllForm());
}
}
}
This is hibernate.cfg.xml
<?xml version="1.0" encoding="utf-8" ?>
<!--
Licensee: Anonymous
License Type: Purchased
-->
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
<session-factory name="localfactory">
<!-- properties -->
<property name="hibernate.connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="hibernate.dialect">NHibernate.Dialect.FirebirdDialect</property>
<property name="hibernate.connection.driver_class">NHibernate.Driver.FirebirdClientDriver</property>
<property name="hibernate.connection.connection_string">DataSource=localhost;Port=3050;Database=C:\Program Files\Microsoft Visual Studio 8\Projects\PLCXC3-19AR-EControllerDB\PLCController\PLCController\bin\Release\PLCController.fdb;User=ZILOT;Password=*******</property>
<property name="show_sql">false</property>
<property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
<!-- mapping files -->
<mapping assembly="PLCController" />
</session-factory>
</hibernate-configuration>
And this is message from exception
http://img36.imageshack.us/img36/4164/screenshot004kj.jpg
I get exception right on the place where I want to create database scheme. I worked with VP and SQL server and did the same thing but there were no problems.
Please Help
zilot
Hi Zilot,
Thanks for your post. I’ve forwarded the issue to our engineers to follow-up, and I’ll come back to you once there is any feedback.
Best regards,
Lilian Wong