Click here to Skip to main content
15,914,500 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Visual Basic homework Pin
Colin Angus Mackay11-Jun-04 9:47
Colin Angus Mackay11-Jun-04 9:47 
GeneralExcel/VBA - Hard question Pin
Jon G11-Jun-04 1:31
Jon G11-Jun-04 1:31 
GeneralRe: Excel/VBA - Hard question Pin
Dave Kreskowiak14-Jun-04 3:00
mveDave Kreskowiak14-Jun-04 3:00 
GeneralAccess security Pin
Rana Kashif10-Jun-04 20:20
Rana Kashif10-Jun-04 20:20 
GeneralRe: Access security Pin
Dave Kreskowiak11-Jun-04 10:32
mveDave Kreskowiak11-Jun-04 10:32 
QuestionHow to add product key in package and Deployement wizard Pin
Rana Kashif10-Jun-04 20:17
Rana Kashif10-Jun-04 20:17 
AnswerRe: How to add product key in package and Deployement wizard Pin
tramdtt10-Jun-04 20:52
tramdtt10-Jun-04 20:52 
GeneralSQLClient and System.Security.SecurityException Pin
sybux200010-Jun-04 20:16
sybux200010-Jun-04 20:16 
Hi,

I'm trying to create a little service that connect to a SQL database.

I'm using USER ID and password for authentication and everytime I try to open the connection I receive the following error :
System.Security.SecurityException: Échec de la demande pour une autorisation de
type System.Data.SqlClient.SqlClientPermission, System.Data, Version=1.0.5000.0,
 Culture=neutral, PublicKeyToken=b77a5c561934e089.
   at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet granted
Set, PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken permT
oken)
   at System.Security.CodeAccessSecurityEngine.Check(PermissionToken permToken,
CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames, Int32
 unrestrictedOverride)
   at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, S
tackCrawlMark& stackMark)
   at System.Security.CodeAccessPermission.Demand()
   at System.Data.SqlClient.SqlConnectionString.Demand(SqlConnectionString const
r)
   at System.Data.SqlClient.SqlConnection.Open()
   at HEG_Console.Module1.Main() in P:\Mes Documents\Visual Studio Projects\HEG_
Console\Module1.vb:line 21


Here is my little little code :
<br />
        Dim cObjConn As SqlClient.SqlConnection<br />
        Try<br />
            cObjConn = New SqlClient.SqlConnection("Initial Catalog=Northwind;Trusted_Connection=true;USER ID=myUser; Password=myPassword;Data Source=myServer")<br />
            cObjConn.Open()<br />
<br />
        Catch se As System.Security.SecurityException<br />
            System.Console.Out.Write(se.ToString)<br />
        End Try<br />


Does any1 know where I'm wrong ?
thx
GeneralRe: SQLClient and System.Security.SecurityException Pin
Dave Kreskowiak14-Jun-04 3:08
mveDave Kreskowiak14-Jun-04 3:08 
GeneralRe: SQLClient and System.Security.SecurityException Pin
sybux200010-Aug-04 10:32
sybux200010-Aug-04 10:32 
GeneralRe: SQLClient and System.Security.SecurityException Pin
Dave Kreskowiak10-Aug-04 13:05
mveDave Kreskowiak10-Aug-04 13:05 
GeneralRe: SQLClient and System.Security.SecurityException Pin
sybux200010-Aug-04 20:28
sybux200010-Aug-04 20:28 
GeneralRe: SQLClient and System.Security.SecurityException Pin
Dave Kreskowiak11-Aug-04 1:31
mveDave Kreskowiak11-Aug-04 1:31 
GeneralRe: SQLClient and System.Security.SecurityException Pin
sybux200011-Aug-04 6:26
sybux200011-Aug-04 6:26 
Generalanother problem Datagrid Pin
dotnet_cpp10-Jun-04 12:16
dotnet_cpp10-Jun-04 12:16 
Generalinser hyperlink at launching outlookexpress Pin
skoizumi2911010-Jun-04 9:31
sussskoizumi2911010-Jun-04 9:31 
GeneralForms Threading Question Pin
Wingnut7410-Jun-04 7:49
Wingnut7410-Jun-04 7:49 
GeneralRe: Forms Threading Question Pin
Dave Kreskowiak10-Jun-04 8:40
mveDave Kreskowiak10-Jun-04 8:40 
GeneralRe: Forms Threading Question Pin
Wingnut7410-Jun-04 13:48
Wingnut7410-Jun-04 13:48 
GeneralSendkeys to messagebox Pin
Brent Lamborn10-Jun-04 7:32
Brent Lamborn10-Jun-04 7:32 
GeneralRe: Sendkeys to messagebox Pin
Dave Kreskowiak10-Jun-04 8:33
mveDave Kreskowiak10-Jun-04 8:33 
GeneralOutlook Object Model Guard Pin
Brent Lamborn10-Jun-04 14:20
Brent Lamborn10-Jun-04 14:20 
GeneralRe: Outlook Object Model Guard Pin
Dave Kreskowiak11-Jun-04 10:21
mveDave Kreskowiak11-Jun-04 10:21 
GeneralWindows service problem accessing network share Pin
Member 116497710-Jun-04 6:02
Member 116497710-Jun-04 6:02 
GeneralRe: Windows service problem accessing network share Pin
Dave Kreskowiak10-Jun-04 6:27
mveDave Kreskowiak10-Jun-04 6:27 

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.