Visual Paradigm Logo
     Build Quality Applications Faster, Better and Cheaper
 
Home | Products | Download | Documentation | Support | Resources | Partners | Quick Tour | Shop | Company |  
 
   Visual Paradigm Discussion Forum
  Login   [ Register ] Email: Password: Log me on automatically I lost my password  
Advanced Search
The dialect was not set  
Forum Index -> DB Visual ARCHITECT (DB-VA)
Author Message
ik


Joined: 2006/11/28
Messages: 4

Offline

Hi, I have an ERD diagram, and I am trying to generate a C# library to be used in an application. It uses MySQL.

All the process is ok, except, if I use a form to do any changes to the DB, I get the exception: "The dialect was not set. Set the property hibernate.dialect."
in the folowing row:
Code:
 	private DataStoragePersistentManager() : base(_connectionSetting, _sessionType) {
 		} 


Can anyone tell me how to try to get rid of this, or that another information may help? P.S. in the xml file the dialect is set...
 
Jick


Joined: 2005/04/29
Messages: 2880

Offline

Hi ik,

Please make sure the mapping XML file (xxxx.cfg.xml) is put correct. It should either embed in the dll/exe or place in working directory.

Best regards,
Jick

Visual Paradigm International Ltd.
http://www.visual-paradigm.com

Build Quality Applications Faster, Better and Cheaper
 
ik


Joined: 2006/11/28
Messages: 4

Offline

Oh, thanks, I have found my mistake. Sorry to take your time
 
bdubs


Joined: 2007/01/03
Messages: 6

Offline

I had this same problem as well. The solution for this is on page 2-11 (Step 14) of the DB-VA Programmer's Guide for .NET. A better solution than copying it manually would be:

VISUAL STUDIO 2005
1. Copy it to the project directory
2. App -> Project -> Add -> Existing Item
3. Select "hibernate.cfg.xml"
4. In "hibernate.cfg.xml" properties
a. change Build Action to "None"
b. change Copy to Output Directory to "Always"

Embedding the hibernate.cfg.xml as a resource did not work for me in Visual Studio 2005.

-b
 
bdubs


Joined: 2007/01/03
Messages: 6

Offline

Actually, I just updated my db schema, and realized that the .xml file didn't update. Adding a line like this to the post-build step is the best way to go:

Code:
 copy $(SolutionDir)..\VisualParadigm\src\hibernate.cfg.xml $(TargetDir) 
 
 
   Forum Index -> DB Visual ARCHITECT (DB-VA)
Go to:   
Powered by JForum 2.1.4 © 2005 - Rafael Steil