Click here to Skip to main content
15,902,893 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
im trying to excute a stored procedure..i have to set sp_SetAppRole to excute it....can anyone please let me know...that how can i do it in Linq...
NavigationDataContext Navigation = new NavigationDataContext("Data Source=j;Initial Catalog=SynergyOne;Integrated Security=True");

Navigation.ExecuteCommand("sp_setapprole 'jp' ,'AsnlyetsheienhgC'");

im geting Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. but im able to access this in sql...


var photo = Navigation.uJPCsp_Portal_StudentDocuments("17", null, null, null);
GridView1.DataSource = photo;
i have found few example in google but nothing is clear.....
any help will be appriciated.
Posted

1 solution

Offhand it sounds like you're using Windows authentication instead of SQL authentication. Try removing the Integrated Security bit in the connection string and supplying a sql username and password

For example:
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;


Check out this page for more info on SQL Server connection strings and examples:

http://www.connectionstrings.com/sql-server-2008[^]

HTH, Good luck.
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900