Posts

Showing posts from August, 2012

Failed to connect to the Internet once repaired LAN connection

Image
Some times windows throws this error when you repair your LAN connection and then could not connect to the internet until you reboot your system. The error comes " windows could not finish repairing because renewing your ip address " once you click Repair option. Then you can not connect to the internet once you repair  your wired or wireless connection. Solution: Go to Control Panel >> Administrative Tools >> Services Locate DHCP Client and start it. That's It.

How to connect C# with MS Access database using OledbConnection

Image
1 : Include Files: using System.Data.OleDb; using System.Data; 2 : Declare variables that intract with DB          OleDbConnection conn;         OleDbCommand comm = new OleDbCommand ();         DataTable dt = new DataTable ();         OleDbDataAdapter da = new OleDbDataAdapter (); 3 : Write a method to  Create Connection private void CreateConnection()         {  conn = new OleDbConnection ( "Provider=Microsoft.Jet.OLEDB.4.0;data source=d:\\sms.mdb" );          if (conn.State == ConnectionState .Closed) {                 conn.Open(); }             comm.CommandType = CommandType .Text;             comm.Connection = conn;         } 4 : Write your method to function with the DB I am using to insert some data in DataBase public int SaveSMS( int number, string SMS) {             CreateConnection();             int result = -1;    try      {      comm.CommandText = "insert into SMSBundle (Mo