Search   

Friday, February 10, 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  Class Generator...
 Class Generator fails to connect to SQLServer
 
 5/4/2007 8:39:32 PM
seanevans
3 posts


Class Generator fails to connect to SQLServer

Hello,

I am using the Class Generator against an SQL Server 2000 database located remotely from where the Class Generator is being executed. Going through the wizard of the Class Generator, I get an error when pressing the "Finish" button that indicates it can't connect to SQL Server with the error "Login failed for user '<user ID>'". During the wizard, the Data Link Properties dialog was displayed and I entered all appropriate information to the database I was connecting to and the "Test Connection" button was successful. Thus, I know the information was correct.

Anyone have any ideas as to why it would fail to connect, especially since the Data Link Properties dialog DID NOT fail?

-Sean

 5/4/2007 11:33:24 PM
Mirko
109 posts
5th


Re: Class Generator fails to connect to SQLServer

Hi Sean,

Please try to write a little .NET
console application with a code like that:

using System;
using System.Data;
using System.Data.SqlClient;

namespace ConsoleApplication7
{
    class Program
    {
        static void Main(string[] args)
        {
            SqlConnection conn = new SqlConnection("Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=NDOTest;Data
Source=localhost");
            conn.Open();
            Console.WriteLine("Connection opened");
            conn.Close();
        }
    }
}

Copy the connection string produced by the Connection Dialog as parameter
for the SqlConnection constructor into the code. Most probably the console app 
will fail too. Now you have to adjust the connection string until the connection
works. Use the resulting string in NDO.

The main reason for failing connects is security. Try several options with integrated security and Sql Server Logons.

If you have further questions, please ask.

Regards,
Mirko

  NDO-Forum postings in english please, if possible.  Developing with NDO  Class Generator...
  SearchSearch  Forum HomeForum Home