Hi,
I have a Windows Application, a Novell Network and a SQL Server 2000 on an Active Directory controlled server. My AD account has access to teh database. I want to login to the database using an Active Directory account, trusted security....but I can't.
Sequence of Events:
1. Login to Network using Novell account.
2. Start Application and it displays login screen.
3. Enter AD account details and press OK
4. This verifies against Active Directory Account using the following code:

VB Code:
  1. Public Function Login() As String
  2.       ' now create the directory entry to establish connection
  3.       Dim deDirEntry As New DirectoryEntry(Me.strDomain, Me.strUser, Me.strPass, Me.atAuthentType)
  4.       Try
  5.  
  6.         ' if user is verified then it will welcome then  
  7.         Try
  8.           Return deDirEntry.Username
  9.         Catch exp As Exception
  10.           Return ""
  11.         End Try
  12.       Finally
  13.         'deDirEntry.Dispose()
  14.       End Try
  15.     End Function 'Login

This all works fine and returns the username if the credentials match
5. Make database connection string (sUserName is the AD username):
VB Code:
  1. Dim sConnstring As String = "User ID=" & sUserName & ";Initial Catalog=VendorSample;Data Source=MyServer...;Timeout=20;Trusted_Connection=True"
6. I get the following error:
Login failed for user '(null)'. Reason: Not associated witha trusted SQl Server connection.

I'm not well up on how AD works etc. but does anybody have any idea how to get past this?