Cancelling the backup/export process

Sep 27, 2012 at 7:13 AM
Edited Sep 27, 2012 at 7:17 AM

First of all i would like to introduce myself i'm Ivan Obillos from Ph. i 'm happy to be part of this project thank you adriancs for approving my request.

Regarding cancelling the backup process i encounter this error:

i was exporting my sample database when in the middle of the export i tried to cancel the process by executing/calling the


i even use the demo program and it also have same error.

Object reference not set to an instance of an object.

void CloseConnection()
            if (_cmd != null)
                if (_cmd.Connection != null)
                    if (_cmd.Connection.State != ConnectionState.Closed)
                        { }
            _cmd.Connection = null;
            _cmd = null;


im new to c# but im trying to learn the language, im a visual basic programmer, and im hoping to be able to master C# language so i could make the Visual Basic equivalent of the


Sep 29, 2012 at 3:26 AM

Welcome, Ivan Obillos from Ph, thanks for the bug report. This will be fixed in the next version.

You can convert the entire project to Visual Basic easily by using tools like C# to VB.NET Converter.

by using the converter, you can easily learn and understand equivalent C# code to VB.NET.

example of code converters:

Oct 2, 2012 at 7:55 AM
Edited Oct 2, 2012 at 8:13 AM

Hi adriancs,


I already converted the project to VB.Net using the links you gave me, but when i tried to use it in my test application i have some issues

can you help me out on this?

I have here the link of the converted file

So far this is the line that has an error, and it says: Arithmetic operation resulted in an overflow.

Public random As Random = New Random(CType(DateTime.Now.Ticks, Long))

Oct 15, 2012 at 8:42 AM

Hi, crazyivan,

The exception of null reference is raised when Cancelling the process is fixed.

You may review the new release version 1.5, available at download.

I have downloaded the file you uploaded.

Something I discovered, it seems that the style of global variable declaration is different between C# and VB.NET.

You still have to manually tweaks, modify some of the parts to make it run.

You can try to move/migrate all the global variable that cause the error in the Converted version to somewhere according to VB.NET coding style.