Okay

the db admin has created a stored procedure called

GetContent_MapPathByName

which can be used like so

exec GetContent_MapPathByName 'put-the-complete-story-name-here’



I wanted to make an app that would allow the users to connected and do this from a winform



what i have so far is

C# Code:
  1. dt.Clear();
  2.             string adapter = string.Format("exec GetContent_MapPathByName ‘{0}’", TB_SearchString.Text);
  3.             string conn = "Data Source = dcsql.usatoday.us.ad.gannett.com; Initial Catalog = [CMS-Site2]; User Id = xxxxx; Password = xxxxx;";
  4.             SqlConnection sqlconn = new SqlConnection(conn);
  5.             SqlDataAdapter daSQL = new SqlDataAdapter(adapter, sqlconn);
  6.             daSQL.Fill(dt);


where xxxxx has been replaced over the name and password ( not windows authentication)


the problem i'm running into is that when i execute code it errors out on the daSQL.fill(dt) line

and it gives the error "Cannot open database "[CMS-Site2]" requested by the login. The login failed.
Login failed for user 'xxxxx'."


But i know that the username and password are correct. becuase i can use thouse same credintals to log in to that server using MS sql managment studio ( and the credintals are under security for that pirticular database too)


Does anyone see any other errors in what im doing?