Results 1 to 6 of 6

Thread: login error failed in SQLServer -- Resolved

  1. #1

    Thread Starter
    Hyperactive Member Kirun's Avatar
    Join Date
    Oct 2001
    Location
    Karachi , Pakistan
    Posts
    333

    Resolved login error failed in SQLServer -- Resolved

    I dont know why this error is comin in SQLHelper.vb

    Code:
    Line 714:            
    ByVal connectionOwnership As SqlConnectionOwnership) As SqlDataReader
    Line 715: Dim mustCloseConnection As Boolean = False
    Line 716: If (connection Is Nothing) Then Throw New ArgumentNullException("connection")
    Line 717:         
    Line 718:' Create a command and prepare it for execution
     
    Source File: G:\Program Files\Microsoft Application Blocks for .NET\Data Access v2\Code\VB\Microsoft.ApplicationBlocks.Data\SQLHelper.vb    Line: 716 
    
    Exception Details: System.ArgumentNullException: Value cannot be null. Parameter name: connection
    Please Help
    Last edited by Kirun; Oct 29th, 2004 at 01:02 AM.

  2. #2

    Thread Starter
    Hyperactive Member Kirun's Avatar
    Join Date
    Oct 2001
    Location
    Karachi , Pakistan
    Posts
    333
    is the problem with the databse conection that i am using in a class in which this SQL helper is used for data retrieving.Is this a problem of permission of the database .

    I have progrmme in my localhost and database is on another server.

    Should any where in ASP i have to mention about the database path or not

    In vb class i have mentioned the server name and passsord and and it was working at my
    PC

  3. #3
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632
    This is one of the core reason I hate .NET

    What is Connection?

    Is it a connection string, or a connection object?

    Why on earth don't .NET developers use:
    VB Code:
    1. Dim strConn As String
    2. 'or
    3. Dim adoConn As ADOConnection
    Makes life MUCH easier.

    Woka

  4. #4

    Thread Starter
    Hyperactive Member Kirun's Avatar
    Join Date
    Oct 2001
    Location
    Karachi , Pakistan
    Posts
    333

    Smile

    As i am using the SQLHelper Classes thats why the connection is the SQLconnection

    I think some how the server name and databas is not reaching to the Connection (i am thinking loud )

    Infact i have given the proper name of server and database in my VB class which i am using and in this VB class i am using the SQL helper classes for data retrieval.

    cna any body have any idea or should i stop using the SQL helper and redesign the entire data retrival

  5. #5

    Thread Starter
    Hyperactive Member Kirun's Avatar
    Join Date
    Oct 2001
    Location
    Karachi , Pakistan
    Posts
    333

    login failed error

    i figured out there is some problem in connectrion. some how the connection string is not appropriate. My application and my SQL server are not on one server i am kaing the connection string as follows

    Code:
    CONNECTIONSTRING = "data source=svr1;initial catalog=data1"
    I have tried to insert integrated security and trusted connection as well but the error is still same.

    I have also tried to put password and username in my connection string but itw as of no use. its giving me still following error

    Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection
    Last edited by Kirun; Oct 28th, 2004 at 04:53 AM.

  6. #6

    Thread Starter
    Hyperactive Member Kirun's Avatar
    Join Date
    Oct 2001
    Location
    Karachi , Pakistan
    Posts
    333

    Resolved

    I figured it ..

    Just add this to web.config file

    VB Code:
    1. <authentication mode="Windows" />
    2.  
    3. <identity impersonate="true" userName="domainname\username" password="pwd"/>

    offcourse the username must be recognized by SQL server.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width