PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.db.ms-sqlserver > How to connect to sql server from dotnet
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
How to connect to sql server from dotnet

Réponse
 
LinkBack Outils de la discussion
Vieux 19/03/2008, 07h41   #1
John Sheppard
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut How to connect to sql server from dotnet

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


  Réponse avec citation
Vieux 19/03/2008, 15h21   #2
Tom van Stiphout
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to connect to sql server from dotnet

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
>

  Réponse avec citation
Vieux 19/03/2008, 16h00   #3
John Sheppard
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to connect to sql server from dotnet

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
>>


  Réponse avec citation
Vieux 19/03/2008, 23h37   #4
Erland Sommarskog
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to connect to sql server from dotnet

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
  Réponse avec citation
Vieux 20/03/2008, 02h45   #5
John Sheppard
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to connect to sql server from dotnet


"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


  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 12h16.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,16034 seconds with 13 queries