Click to See Complete Forum and Search --> : Why the COM-object doesn't work after I compile it into a DLL and register it?
Wang Huaizhi
February 10th, 2001, 05:54 AM
I have a big problem with my COM-objects, which is compiled with Visual Basic, and the COM-object impliment some database accessing work. After I compiled it into a DLL and register it, I found I cannot access database correctly, but when I execuate it in the Visual Basic Enviroment, the whole thing is well. Why?
Wang Huaizhi
Johnny101
February 13th, 2001, 03:39 PM
What's the problem? Is it not connection at all? or to the wrong database or what?
make sure you aren't using app.path in your dll - it does not reflect the current location of the dll, itself, but rather the location of the calling process. so if you are expecting to find a settings file in the dll's directory, you probably wont, when called from a process who's source code is running elsewhere.
john
John Pirkey
MCSD
http://www.ShallowWaterSystems.com
http://www.stlvbug.org
tomcat99
February 17th, 2001, 01:20 PM
The DLL might work just fine but if you are using a RDBMS like SQL Server which require user authentication then you are on shaking ground! Check carefully your access rights! By default IIS will use IUSR_ComputerName account to access your database, which more that sure has no rights!
If you are using SQL Server use SQL Trace to monitor database operations and you'll find the error quicker!
Hope that helped.
tomcat
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.