Probleme de connection

Résolu
cs_fred2019 Messages postés 20 Date d'inscription mardi 10 avril 2007 Statut Membre Dernière intervention 25 mai 2007 - 10 avril 2007 à 11:17
cs_fred2019 Messages postés 20 Date d'inscription mardi 10 avril 2007 Statut Membre Dernière intervention 25 mai 2007 - 10 avril 2007 à 11:32
bonjour à tous,
 
J'essaye d'établir une connexion à sql server 2005 en vb.net
j'utilise un fichier de configuration
voici ma connectionstring: 

 
...
key="ConnectionString" value="Data Source=localhost;Initial Catalog=northwind;Integrated Security=true"/>
... 
 

....

Imports

System.Data.SqlClient

Public
Class Form1

Inherits System.Windows.Forms.Form

Dim mySqlConnection
As SqlConnection

Private
Sub Form1_Load(
ByVal sender
As System.Object,
ByVal e
As System.EventArgs)
Handles
MyBase.Load
   mySqlConnection =
New SqlConnection(System.Configuration.ConfigurationManager.AppSettings.Get(
"ConnectionString"))

End
Sub
 

Private
Sub btnInsert_Click(
ByVal sender
As System.Object,
ByVal e
As System.EventArgs)
Handles btnInsert.Click

Dim mySqlCommand
As SqlCommand =
New SqlCommand

'Open connection
mySqlConnection.Open()

au moment de l'exécution  une erreur survient :  
 
Cannot open database requested in login 'northwind'. Login fails.
Login failed for user ....
 
voila, si quelqu'un a la solution cela m'aiderais beaucoup
merci

2 réponses

jrivet Messages postés 7392 Date d'inscription mercredi 23 avril 2003 Statut Membre Dernière intervention 6 avril 2012 60
10 avril 2007 à 11:23
Salut,
Doublon!!!
Inutile de poster dans plusieurs rubriques. une seule suffit pour que ton problème soit visible ici => http://www.vbfrance.com/infomsgts_full_liste.aspx

@+: Ju£i?n
Pensez: Réponse acceptée
3
cs_fred2019 Messages postés 20 Date d'inscription mardi 10 avril 2007 Statut Membre Dernière intervention 25 mai 2007
10 avril 2007 à 11:32
Désole, je me suis trompé de rubrique, c'est pour cela que je l'ai reposté
0
Rejoignez-nous