Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. retrieve data problems

retrieve data problems

Scheduled Pinned Locked Moved ASP.NET
csharpdatabaseasp-netsql-serversysadmin
2 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ahsan2011
    wrote on last edited by
    #1

    hii i m trying to retrieve data from sql using C#.net private void Page_Load(object sender, System.EventArgs e) SqlConnection con; SqlDataReader dr; SqlCommand cmd; con = new SqlConnection("Server=ADNAN;Database=system;UID=sa;pwd="); cmd = new SqlCommand("Select * from info",con); con.Open(); dr= cmd.ExecuteReader(); Repeater1.DataSource= dr; Repeater1.DataBind(); dr.Close(); con.Close(); Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection. When user id and password is removed..recieves a message "Login failed for user ' ADNAN \ASPNET" Ahsan

    K 1 Reply Last reply
    0
    • A ahsan2011

      hii i m trying to retrieve data from sql using C#.net private void Page_Load(object sender, System.EventArgs e) SqlConnection con; SqlDataReader dr; SqlCommand cmd; con = new SqlConnection("Server=ADNAN;Database=system;UID=sa;pwd="); cmd = new SqlCommand("Select * from info",con); con.Open(); dr= cmd.ExecuteReader(); Repeater1.DataSource= dr; Repeater1.DataBind(); dr.Close(); con.Close(); Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection. When user id and password is removed..recieves a message "Login failed for user ' ADNAN \ASPNET" Ahsan

      K Offline
      K Offline
      Kunal P
      wrote on last edited by
      #2

      go to the enterprise manager, and create a new user for the database SYSTEM. it should be an asp.net user, also grant all the privileges.. hope it helps

      Kunal

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups