Search   

Sunday, February 05, 2012

Support » Support Forum

Register  Login

 Menu  
 
    

 Welcome!  
 


Welcome to the NDO support forum!

kreis.gif Please register/login at the site if you want to post a thread. We sometimes copy support mails of common interest to the forum. They appear with anonymous sender.
kreis.gif Please post your messages in English language if possible. You can do your posts also in German, we will translate your post and our answer so that all users of the forum can read your posts.
kreis.gif The forum software requires that javascript is enabled.
kreis.gif Please do not insert licence information or licence keys in forum posts.
kreis.gif If you know a good answer to a post of another user, feel free to reply!
kreis.gif The forum is monitored. We reserve the right to remove posts we consider not to be useful for other forum users.

   Print   

      
 NDO Support Forum  
 
SearchForum Home
  NDO-Forum postings in english please, if possible.  Developing with NDO  Connectionstrin...
 Connectionstring
 
 1/19/2007 10:37:34 AM
jaegerbo
3 posts


Connectionstring
Hello, I've just installed the trial version and want to test it with a little program. I've used the NDO-Configuration wizzard that creates a connectionstring for me. But when I start the programm, I got the following error when the persitentmanager wants to build the database. Can't construct a connection object: Schlüsselwort wird nicht unterstützt: 'provider'.. Check your connection string. The connectionstring, build by the wizzard is: Provider=SQLOLEDB;Persist Security Info=False;User ID=jaegerbo;Initial Catalog=NDO_Test;Data Source=SQL01 What is wrong? Bodo Jäger
 1/23/2007 10:11:14 AM
Mirko
109 posts
5th


Re: Connectionstring

Hi Bodo,

the string Provider=SQLOleDb shouldn't appear in the connection string. Perform the following steps:

1. Choose SqlServer in the Sql Dialect ComboBox.
2. Open the Connection Dialog with pressing the button "..." to connect to an existing database or "New" to create a new database. If you create a new database, you get a Connection Dialog too. Leave the Database EditBox in the Connection Dialog empty.

I think, the wrong connection string appeared, because you chose a SqlServer connection string while the Sql Dialect ComboBox was set to "Access".

Best Regards
Mirko

 1/31/2007 8:55:19 AM
jaegerbo
3 posts


Re: Connectionstring
Hi Mirko, the SQL Dialect combo was set to SqlServer, and the default connectionstring in the NDO Configuration was OK and without the "provider"-token:
"Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=NDO_Test;Data Source=SQL01"

But when I look into the properties of the PersistenceManager there is something I don't understand. The Name has now a Provider-token.
pm.NDOMappings.Connections.Items(0).Name = "Provider=SQLOLEDB;Persist Security Info=False;User ID=jaegerbo;Initial Catalog=NDO_Test;Data Source=SQL01"
but
pm.NDOMappings.Connections.Items(0).Type = "SqlServer"

If I change the pm.NDOMappings.Connections.Items(0).Name to the connectionstring generated by the NDO Configuration Manager it works.

Bodo
 2/2/2007 11:07:15 AM
Mirko
109 posts
5th


Re: Connectionstring
 Modified By Mirko  on 2/2/2007 12:09:06 PM)

Hi Bodo,

sorry for the late answer, I was at a business trip and didn't have any time to respond the questions in the forum.

NDO takes the default connection string from the configuration and inserts it as "C0" connection to the mapping file. If you change the default connection string after NDO inserted the "C0" connection, NDO will insert the new string as "C1" connection. But all classes will further use the "C0" connection.

In this case you have to take a look at the NDOMapping.xml and make sure, the correct connection string is used. I use to delete the NDOMapping.xml and let it rebuild by NDO to always have the current connection string available. But this applies only for mappings not having any hand coded changes like ColumnLength entries.

Best Regards
Mirko

 2/5/2007 7:17:01 AM
jaegerbo
3 posts


Re: Connectionstring
Hi Mirko, that's it. The xml was wrong. Thank you Bodo
  NDO-Forum postings in english please, if possible.  Developing with NDO  Connectionstrin...
  SearchSearch  Forum HomeForum Home