Using WithEvents on SQL Server Connection object

GaryDGaryD Member Posts: 66
Hello,
We've got Nav 5.1 and SQL Server 2005. We've got routines built that will execute store procedures and they work fine. But I wanted to play around with WithEvents on the connection object (ActiveX Data Objects 2.7 or 2.8). But is seems that just by turning on the WithEvents property, an error is generated during execution. The error is:
The expression Variant cannot be type-converted to a Automation value.
I even created a new codeunit and simplified the logic to call a stored procedure as much as possible, and still, when the codeunit runs I get this error. I get it twice, once on the "WillConnect" event and again on the ConnectComplete event. I've searched the Internet and only found one instance where this error message was mentioned and that person never got a reply to his inquiry. Any ideas?

Thanks!
Sign In or Register to comment.