Tuesday, July 14, 2009

How do I connect, read from, and write to a sql server 2000 data base via C#.NET 2005?

I can write applications in C#.NET 2005, and can make databases in MS SQL Sever 2000. Now I want to access this database using my application. How would I go about doing that?

How do I connect, read from, and write to a sql server 2000 data base via C#.NET 2005?
To Connect use: System.Data.SQLClient.SQLConnection





Connection String: Provider=sqloledb;Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;





To Access use: System.Data.DataTable


System.Data.DataSet





Hope this helps,





Cheers


No comments:

Post a Comment