Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Access SQL Database
Message
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Divers
Thread ID:
00671676
Message ID:
00671889
Vues:
12
>HI,
>I am using MSDE. How could I set the right using VS.NET?
>
>Why I can access the webmatrix but not in vs.net? I never pass any username or password in connection string in webmatrix either..
>
>Thank you

I have never used MSDE or WEB matrix so I cant help there but here is a sample of how I would connect to data with SQL server. Maybe you can apply it to your situation.
string sCommand = "SELECT * FROM Client" ;
SqlConnection oConnection = new SqlConnection("SERVER=(local);UID=MyUserName;PWD=MyPassword;DATABASE=MyDatabase") ;
SqlCommand oCommand = new SqlCommand("",oConnection) ;
SqlDataAdapter oAdapter = new SqlDataAdapter(oCommand) ;
			
oCommand.CommandType = CommandType.Text ; 
oCommand.CommandText = sCommand ; 
DataSet ds = new DataSet();
oAdapter.Fill(ds,"Campaign") ;
ds is the result of your SQL command

If anyone knows how to do this with MSDE, please jump in.





Chris
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform