Afficher un message
Vieux 19/03/2008, 17h00   #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
 
Page generated in 0,07227 seconds with 9 queries