|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello,
Im trying to connect to my sql server with dotnet...me bang head Iconnected to many access and mysql ok...I think sqlserver hates me... This is the error I get; Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. This is my code; 'Dim connString As String = "Driver={SQL Native Client};Server=PC01-ITMANAGER;Database=BMS;Uid=john.sheppard;Pwd=#mypa ss;" 'Dim connString As String = "Data Source=PC01-ITMANAGER; Initial Catalog=BMS; Integrated Security=SSPI;" 'Dim connString As String = "Provider=sqloledb;Data Source=PC01-ITMANAGER;Initial Catalog=BMS;" 'nooledb work either 'Dim connString As String = "Provider=sqloledb;Data Source=PC01-ITMANAGER; Initial Catalog=BMS; Integrated Security=SSPI;" 'Dim connString As String = "Data Source=PC01-ITMANAGER\MSSQLSERVER; Initial Catalog=BMS; Uid=administrator; pwd=hahayoudontthinkidputthatheredoyou" Dim connString As String = "Data Source=PC01-ITMANAGER\MSSQLSERVER; Initial Catalog=BMS; Integrated Security=SSPI;" Dim myConnection As New SqlConnection(connString) myConnection.Open() Does anyone have any idea? Thank you very much for any assistance one might offer John Sheppard |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Wed, 19 Mar 2008 16:41:01 +1000, "John Sheppard" <spam@nospam.com>
wrote: I typically get my connection strings from here: www.connectionstrings.com "Integrated Security=SSPI" is more than likely NOT going to work. -Tom. >Hello, > >Im trying to connect to my sql server with dotnet...me bang head I>connected to many access and mysql ok...I think sqlserver hates me... > >This is the error I get; >Request for the permission of type >'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, >Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. > >This is my code; >'Dim connString As String = "Driver={SQL Native >Client};Server=PC01-ITMANAGER;Database=BMS;Uid=john.sheppard;Pwd=#mypa ss;" > >'Dim connString As String = "Data Source=PC01-ITMANAGER; Initial >Catalog=BMS; Integrated Security=SSPI;" > >'Dim connString As String = "Provider=sqloledb;Data >Source=PC01-ITMANAGER;Initial Catalog=BMS;" 'nooledb work either > >'Dim connString As String = "Provider=sqloledb;Data Source=PC01-ITMANAGER; >Initial Catalog=BMS; Integrated Security=SSPI;" > >'Dim connString As String = "Data Source=PC01-ITMANAGER\MSSQLSERVER; Initial >Catalog=BMS; Uid=administrator; pwd=hahayoudontthinkidputthatheredoyou" > >Dim connString As String = "Data Source=PC01-ITMANAGER\MSSQLSERVER; Initial >Catalog=BMS; Integrated Security=SSPI;" > >Dim myConnection As New SqlConnection(connString) > > >myConnection.Open() > > > > > >Does anyone have any idea? > >Thank you very much for any assistance one might offer > >John Sheppard > |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Thanks Tom...
Thats indeed where I got mine from ![]() I found the problem. Well not specifically. The problem had something to do with being in a solution with other projects. I took it out of the solution and stood it alone and it worked fine. I have no idea what the actual cause was, they were just small apps id written to do various xml processing and unrelated... Thanks heaps top Regards John Sheppard "Tom van Stiphout" <no.spam.tom7744@cox.net> wrote in message news:0982u31pnuntsfbrj20b3t4gh2tu9ai93h@4ax.com... > On Wed, 19 Mar 2008 16:41:01 +1000, "John Sheppard" <spam@nospam.com> > wrote: > > I typically get my connection strings from here: > www.connectionstrings.com > "Integrated Security=SSPI" is more than likely NOT going to work. > > -Tom. > > >>Hello, >> >>Im trying to connect to my sql server with dotnet...me bang head I>>connected to many access and mysql ok...I think sqlserver hates me... >> >>This is the error I get; >>Request for the permission of type >>'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, >>Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. >> >>This is my code; >>'Dim connString As String = "Driver={SQL Native >>Client};Server=PC01-ITMANAGER;Database=BMS;Uid=john.sheppard;Pwd=#mypa ss;" >> >>'Dim connString As String = "Data Source=PC01-ITMANAGER; Initial >>Catalog=BMS; Integrated Security=SSPI;" >> >>'Dim connString As String = "Provider=sqloledb;Data >>Source=PC01-ITMANAGER;Initial Catalog=BMS;" 'nooledb work either >> >>'Dim connString As String = "Provider=sqloledb;Data Source=PC01-ITMANAGER; >>Initial Catalog=BMS; Integrated Security=SSPI;" >> >>'Dim connString As String = "Data Source=PC01-ITMANAGER\MSSQLSERVER; >>Initial >>Catalog=BMS; Uid=administrator; pwd=hahayoudontthinkidputthatheredoyou" >> >>Dim connString As String = "Data Source=PC01-ITMANAGER\MSSQLSERVER; >>Initial >>Catalog=BMS; Integrated Security=SSPI;" >> >>Dim myConnection As New SqlConnection(connString) >> >> >>myConnection.Open() >> >> >> >> >> >>Does anyone have any idea? >> >>Thank you very much for any assistance one might offer >> >>John Sheppard >> |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
John Sheppard (spam@nospam.com) writes:
> Im trying to connect to my sql server with dotnet...me bang head I> connected to many access and mysql ok...I think sqlserver hates me... > > This is the error I get; > Request for the permission of type > 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, > Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. I don't really know what that means, but it looks like a problem with signed assemblies or somesuch and not a problem with SQL Server per se. -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Books Online for SQL Server 2005 at http://www.microsoft.com/technet/pro...ads/books.mspx Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinf...ons/books.mspx |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
"Erland Sommarskog" <esquel@sommarskog.se> wrote in message news:Xns9A66F215DD9A7Yazorman@127.0.0.1... > John Sheppard (spam@nospam.com) writes: >> Im trying to connect to my sql server with dotnet...me bang head I>> connected to many access and mysql ok...I think sqlserver hates me... >> >> This is the error I get; >> Request for the permission of type >> 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, >> Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. > > I don't really know what that means, but it looks like a problem with > signed assemblies or somesuch and not a problem with SQL Server per se. > > > -- > Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se > > Books Online for SQL Server 2005 at > http://www.microsoft.com/technet/pro...ads/books.mspx > Books Online for SQL Server 2000 at > http://www.microsoft.com/sql/prodinf...ons/books.mspx You a right! I think it possibly was something along those lines! Fixed now tho. Thanks Erland! Regards John |
|
![]() |
| Outils de la discussion | |
|
|