Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Other Development Tools
 [SQL-DMO]Code execution exception

Author  Topic 

iamlerxt
Starting Member

11 Posts

Posted - 2004-10-06 : 11:48:08
I am using SQLDMO backup object in VB6. I am declaring the object WITHEVENTS so I can use the PercentComplete event to update a progress bar. When I execute the SQLBackup method, it creates a legal, restorable backup in the correct location. It also updates the progress bar perfectly. But it raises an error -2147221499 [SQL-DMO]Code execution exception: EXCEPTION_ACCESS_VIOLATION. I have searched the web for this error and haven't found much info in the context that I need. MSDN offers workaround fixes, but not specifically for the sqldmo backup object.
My frustration has reached the point where I'm actually considering trapping and ignoring the error, since I do have valid backups being generated. Any help would be greatly appreciated.

Ronnie Applewhite
ClubTec

rsanteza
Starting Member

1 Post

Posted - 2004-10-15 : 03:50:24
Hi Ronnie,

You should add two sub procedure within your form, for example you use DBBackUp as your SQLDMO object name

' declare SQLDMO Object
Dim WithEvents DBBackUP As SQLDMO.Backup


' then add two procedure below
Private Sub DBBackUP_Complete(ByVal Message As String)
' add message that the backup is completed
End Sub

Private Sub DBBackUP_PercentComplete(ByVal Message As String, ByVal
Percent As Long)
' add message or progress bar
End Sub

I hope this message will help you....

Ronnie Anteza
Go to Top of Page
   

- Advertisement -