I have gotten this error before, although it was with an already compiled and installed program. The program makes a connection to SQL Server and displays the available databases for users to choose. I had trouble with the installation package not installing madart.dll on some machines, so I just placed a copy of the .dll in the install directory and would install it manually using regsvr32 (I work in a small shop where doing it this way is possible). This seemed to work fine, but some of my users have the Desktop Edition of SQL Server installed on their machines, and they started reveiving this error message when they tried to connect to the SQL Server. Also, the program is being run across the network, with the .exe residing on the server. Msdart.dll was also residing in the same directory as the .exe. After much hair pulling and cursing, I finally determined that this error was occurring because the .dll was in the same directory as the .exe. As soon as I moved the .dll to another directory the error went away. Wierdness!
Anyway, I don't know if this will help you or not, but there it is. Good luck. I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson