SQL_DMO.SQLServer Problem -> Need Some Help!
I'm trying to connect to an SQL Server on a deferent machine using SQL_DMO object.
I want to connect and then to check the connection and to get the right event for it:
option explicit
public withevents Dmo as SQLDMO.SQLServer
___________________________________________
...Form_load()
Set Dmo = New SQLDMO.SQLServer
Dmo.LoginSecure = False
Dmo.Connect m_ServerName, m_LoginName, m_LoginPassword
Dmo.VerifyConnection
************************************************************************
If I'm declaring the Dmo like this:
public Dmo as SQLDMO.SQLServer
it's working fine only I don't get any events.
If I'm declaring the Dmo like this:
public withevents Dmo as SQLDMO.SQLServer
After the Dmo.Connect..... It gives me an Error:
[SQL-DMO] code execution exception:
EXCEPTION_ACCESS_VIOLATION
AND I JEST DON'T NOW WHAT IS THE PROBLEM HERE?!