看看 http://itdevcorner.blogspot.com/2007/07/unable-to-load-sql-server-oledb.html 简要: To connect to SQL Server using Oledb method, Windows uses two files: SQLOLEDB.DLL and SQLOLEDB.RLL. The first one is the one who's in charge to make the connection, the second is file that is used by the first one. Both must be there and are in the same folder. The error message means that your program find the sqloledb.dll but is missing the sqloledb.rll. So, you might want to search you HDD for "sqloledb.*" Most likely you will find them in several folders. By default they are in C:\Program Files\Common Files\System\Ole Db but your program may looking for in Windows System directory. If you have sqloledb.dll in your windows system path but none of sqloledb.rll then all you have to do is just copy the file sqloledb.rll into your Windows System folder. This should work.
比如本机只有 3.5 的而你要用 4.0 的。
2,如果是其他机器访问XP的SQL,则需要关闭防火墙
3,在控制面板中手工配制ODBC
http://itdevcorner.blogspot.com/2007/07/unable-to-load-sql-server-oledb.html
简要:
To connect to SQL Server using Oledb method, Windows uses two files: SQLOLEDB.DLL and SQLOLEDB.RLL. The first one is the one who's in charge to make the connection, the second is file that is used by the first one. Both must be there and are in the same folder. The error message means that your program find the sqloledb.dll but is missing the sqloledb.rll.
So, you might want to search you HDD for "sqloledb.*" Most likely you will find them in several folders. By default they are in C:\Program Files\Common Files\System\Ole Db but your program may looking for in Windows System directory. If you have sqloledb.dll in your windows system path but none of sqloledb.rll then all you have to do is just copy the file sqloledb.rll into your Windows System folder. This should work.