|
-
Mar 3rd, 2002, 11:36 AM
#1
Thread Starter
Junior Member
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?!
Last edited by RivKin; Mar 3rd, 2002 at 12:13 PM.
-
Mar 13th, 2003, 05:00 AM
#2
Lively Member
SQLDMO and WithEvents
Hi there,
I had a similar problem, maybe the same solution applies:
Add an event-handler for EVERY event the SQLDMO-object offers (do this for every SQLDMO-Class).
If you don't want to do anything in the event-handler add a comment-line!
I know it sounds strange but it worked for me!
Kind regards,
Blaff
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|