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:
00672032
Vues:
11
>If anyone knows how to do this with MSDE, please jump in.

It would be exactly the same with MSDE, AFAIK (haven't tried it though).

~~Bonnie


>>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.
>
>
>
>
>
>
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform