Hi all.
I dont know if it is right group but maybe you guys be able to show me
a right direction. And im sorry, if i crossposted this message to
several groups.
Ok ,the problem is following:
We have a large ATL COM dll, which is used as common interface for our
database and it is used by many different applications (like Notes, VB6
apps etc). We wrote it a few years ago using VC6++(if it matters) and
everything worked just fine. This spring we updated our developement
tools to VS2005 and i updated VC6 project to VS2005. After few days of
work i got it compiled. NOW the real problem.
Our new C# applications use same COM dll through interop dll and once
again, everything works just fine EXCEPT, C# applications cannot use
SQLServer 2005 database through interop dll!!! This is the only
combination which does not work (C# -> interop dll -> ATL-COM dll -> SQL
Server 2005).
All other tests passed normally, like:
C# app -> interop dll -> ATL-COM dll -> ms access db.
normal C++ app -> ATL-COM dll -> SQL Server 2005 db.
normal C++ app -> ATL-COM dll -> ms access db.
but this one does NOT!!!!
C# -> interop dll -> ATL-COM dll -> SQL Server 2005
Although database object is correctly created in C# app and even
connection to SQL Server 2005 established successfully, every call to
get data from database failes to exception (seems like the exception
type differs randomly, like ArgumentException etc.). Sometimes DLL COM
returns database error like "specified object does not exist").
Can you guys tell me whats going on!!!
Im running out of ideas cause EXACTLY same dll works with other
databases and other programs that C# can use SAME dll with SQL2005 and
no problems...
thanks
Asko.
Roger Wolter[MSFT] wrote:
> Definitely a long shot but C# strings are always Unicode and your VC6 dll
> might not be expecting unicode.
>
Thank you for your response.
Our ATL DLL is definitely unicode cause we have alot of international
data in db and thus it cannot be the cause to my problem.
Asko.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment