Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SecurityException in VB.NET using an OLEDB Connection

Status
Not open for further replies.

canary

Programmer
Mar 14, 2001
25
HK
I wrote a piece of testing code using an oleDB connection to connect to a sybase database (code as follows):

Imports System.Data.OleDb

sub connect()

Dim PipeCon As OleDbConnection = New OleDbConnection("provider=sqloledb,data source=ABC_TEST," & _
"user id=test;password=test;database=test")

Dim pipecmd As OleDbCommand = New OleDbCommand()
pipecmd.CommandText = "select * from tblPriorDetails"
PipeCon.Open()

End Sub

I had a call from a form with a button that basically said "call connect()". Everytime it executed this command the below error message appeared.

"System.Security.SecurityException

Additional Info: Request Failed"

Could anyone tell me why this is happening and any remedies available?

Thanks!!!!!
 
1. verify the connection string info is correct.

2. Start -> Settings -> Control Panel -> Administrative Tools -> Microsoft .NET Framework 1.1 Wizards.
2.1 Click on Adjust .Net Security.
2.2 Make changes to computer
2.3 My Computer should have Full Trust
2.4 Local Intranet should have Full Trust.

This should get you started.

Scott
Programmer Analyst
<{{><
 
Is your .NET Exe placed on a network drive or is it on your local drive? We were getting a similar message when we tried running .NET exe from a network drive. If that is the case try copying Exe to your local drive.

-Kris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top