This is a common problem for Vb users.some of you know what is that.when you try to run vb programme on your machine which made on another machine it gives compile error like user define data type not defined & it shows error in this "Dim conn As ADODB.Connection" line.
To resolve this problem you need to remove reference to Microsoft ActiveX Data Objects 2.0 Liberary and then add reference to Microsoft ActiveX Data Objects 2.5 liberary or later version. To do this follow this steps:
1) On the Project menu, click References.
2)In the References dialog box,click to uncheck the Microsoft ActiveX Data Objects 2.0 Library box and then click ok.
3) Click to select the Microsoft ActiveX Data Objects 2.5 Library check box, and then click OK.
4) On the Run menu, click Start to run the programme .
Solution-:
To resolve this problem you need to remove reference to Microsoft ActiveX Data Objects 2.0 Liberary and then add reference to Microsoft ActiveX Data Objects 2.5 liberary or later version. To do this follow this steps:
1) On the Project menu, click References.
2)In the References dialog box,click to uncheck the Microsoft ActiveX Data Objects 2.0 Library box and then click ok.
3) Click to select the Microsoft ActiveX Data Objects 2.5 Library check box, and then click OK.
4) On the Run menu, click Start to run the programme .