Thanks Veena for your answer I appreciate it very much... but can u give me a detailed code from opening a connection to closing a connection.... I'm really not good in database, I know this is too much.
Create a ODBC.
Add References to ur project "Microsoft ActiveX Data Objects 2.0 Library" (or any latest Version if u have)
In MDI Form Load :
Dim ad as ADODB.Connectionset ad=New ADODB.ConnectionLet ad.ConnectionString= "MyODBC;DSN=" & DatabaseName & ";UID=" & UserName & ";PWD=" & UserPasswordad.Open
To Get records from the Database use
dim ar as ADODB.recordsetset ar=new adodb.recordsetar.open "Select * From EmpMas Order By ENo"If Not (ar.EOF And ar.BOF) Thenar.MoveFirstdo while not ar.EOF Debug.Print ar("ENo") ar.movenextloopTo execute an SQL Statement :
ad.Execute "Update EmpMas Set EName ='MyName' Where ENo=1"