Click here to Skip to main content
15,914,405 members
Home / Discussions / Database
   

Database

 
GeneralScripting User in SQL Server 2000 Pin
Rizwan Bashir1-Jun-05 23:56
Rizwan Bashir1-Jun-05 23:56 
GeneralRe: Scripting User in SQL Server 2000 Pin
Colin Angus Mackay2-Jun-05 0:31
Colin Angus Mackay2-Jun-05 0:31 
GeneralDatagrid update and current row under edit. Pin
Itanium1-Jun-05 2:09
Itanium1-Jun-05 2:09 
GeneralSQL Oraclce code to SQL2000 convertion Pin
Mohammad Daba'an31-May-05 22:26
Mohammad Daba'an31-May-05 22:26 
GeneralPerformance around SQL and C# Pin
ouvrard31-May-05 21:46
ouvrard31-May-05 21:46 
GeneralRe: Performance around SQL and C# Pin
Colin Angus Mackay31-May-05 21:52
Colin Angus Mackay31-May-05 21:52 
GeneralRe: Performance around SQL and C# Pin
ouvrard31-May-05 21:55
ouvrard31-May-05 21:55 
GeneralSql access with user control Pin
ShugMagoo31-May-05 12:00
ShugMagoo31-May-05 12:00 
I am trying to access a database from a client and am getting access errors. I have it working on the server. The server is setup to trust the assembly via a strong key.

I don't want to setup each client to trust the assebly so I am trying to use SqlClientPermission.Assert but it does not seem to be working.

Any ideas? Thanks in advance.

Here is the code

SqlClientPermission sqlClientPerm = new SqlClientPermission(PermissionState.Unrestricted);
sqlClientPerm.Assert();

string strSql;
string myConnectString = "Persist Security Info=False;Integrated Security=true;database=myDataBase;server=xx.xxx.xxx.xx;Connect Timeout=10";

strSql = "UPDATE tblText SET Text = '";
strSql += tbText.Text;
strSql += "' WHERE TextID = 1";

// Set the query
SqlCommand sqlCmd = new SqlCommand(strSql);

// Get the connection
sqlCmd.Connection = new SqlConnection(myConnectString);

sqlCmd.CommandType = CommandType.Text;

// Open the database
if ( sqlCmd.Connection.State == ConnectionState.Closed )
{
sqlCmd.Connection.Open();
}

// Do the query
sqlCmd.ExecuteNonQuery();

SqlClientPermission.RevertAssert();
GeneralDatabinding in Master/Detail WinForm Pin
kb4mindia31-May-05 2:20
kb4mindia31-May-05 2:20 
GeneralQ: MsSQL dynamic Search with lot of conditions Pin
Stan Angeloff31-May-05 1:52
Stan Angeloff31-May-05 1:52 
GeneralRe: Q: MsSQL dynamic Search with lot of conditions Pin
Christian Graus31-May-05 12:06
protectorChristian Graus31-May-05 12:06 
GeneralRe: Q: MsSQL dynamic Search with lot of conditions Pin
Stan Angeloff1-Jun-05 7:14
Stan Angeloff1-Jun-05 7:14 
GeneralRe: Q: MsSQL dynamic Search with lot of conditions Pin
Christian Graus1-Jun-05 11:34
protectorChristian Graus1-Jun-05 11:34 
GeneralThank you! Pin
Stan Angeloff2-Jun-05 8:28
Stan Angeloff2-Jun-05 8:28 
GeneralRe: Thank you! Pin
Christian Graus2-Jun-05 10:17
protectorChristian Graus2-Jun-05 10:17 
GeneralRe: Thank you! Pin
Vertyg05-Jun-05 1:53
Vertyg05-Jun-05 1:53 
GeneralRe: Thank you! Pin
Christian Graus5-Jun-05 11:18
protectorChristian Graus5-Jun-05 11:18 
GeneralFunction returning Table (SQL) Pin
LIUCKAS31-May-05 0:28
LIUCKAS31-May-05 0:28 
GeneralExecuting a query Pin
Pothirajan C30-May-05 19:15
Pothirajan C30-May-05 19:15 
GeneralRe: Executing a query Pin
MasudM30-May-05 21:17
MasudM30-May-05 21:17 
GeneralRe: Executing a query Pin
Colin Angus Mackay30-May-05 22:18
Colin Angus Mackay30-May-05 22:18 
GeneralUpdate query Pin
jetset3230-May-05 1:19
jetset3230-May-05 1:19 
GeneralRe: Update query Pin
Christian Graus30-May-05 12:16
protectorChristian Graus30-May-05 12:16 
GeneralRe: Update query Pin
Anonymous2-Jun-05 3:37
Anonymous2-Jun-05 3:37 
GeneralRe: Update query Pin
jetset324-Jun-05 10:49
jetset324-Jun-05 10:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.