Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access SQL Database
Message
General information
Forum:
ASP.NET
Category:
Databases
Miscellaneous
Thread ID:
00671676
Message ID:
00671889
Views:
13
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform