vb.net - COM Error in ADODB connection -
in console application have simple database connectivity code. shows com exception error in adodb.connection line.
module module1 sub main() dim cn new adodb.connection() //error cn.connectionstring = "provider=sqloledb;server=localhost;database=northwind;uid=<username>" cn.open() end sub end module
i added microsoft activex data objects 2.8
library in reference,but error appeared. changes library microsoft activex data objects 6.0 library, still shows error. when run applicaiton first shows 1 error-
the procedure entry point _loadversionedresourceex@16 not located in msdart.dll.
and
com exception unhandled: retrieving com class factory component clsid {00000514-0000-0010-8000-00aa006d2ea4} failed due following error: 8007007f specified procedure not found. (exception hresult: 0x8007007f).
im using windows 7, visual studio 2010, vb.net
probably have obsolete msdart.dll
file in %windir%\system32
replace correct msdart.dll (v2.71.9031.4)
file located in %windir%\system32\dllcache
folder.
another work around include microsoft data access components
library in project > add reference > com tab
Comments
Post a Comment