Results 1 to 1 of 1

Thread: [RESOLVED] Connect to SQL dbase

Threaded View

  1. #1

    Thread Starter
    Fanatic Member staticbob's Avatar
    Join Date
    Jan 2005
    Location
    Manchestershire, UK Cabbage: I do
    Posts
    619

    Resolved [RESOLVED] Connect to SQL dbase

    Guys,

    I am trying to read from my SQL dbase on my page load event. I am using connection string and code that I have working in a VB.net windows app, but I am getting the following error . .

    Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

    If I do this on my windows app it works fine. Can somebody enlighten me on this please ?

    Here is an example of my code . . .

    VB Code:
    1. Dim myConnection As New SqlConnection("server=(local);persist security info=False;initial catalog=ProjectWorkbookV3Live;integrated security = sspi")
    2.         Dim myCommand As New SqlDataAdapter("select * from staff where id = '11714'", myConnection)
    3.  
    4.         myCommand.Fill(DataSet11, "staff")


    Thanks in advance,
    Bob

    SORRY - I resolved this myself by adding this to web.config.....

    <authentication mode="Windows" />
    <identity impersonate="true" />
    Last edited by staticbob; Aug 4th, 2005 at 07:09 AM.

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