I am using 'ADOX.Catalog' namespace and the following code to create a new MS Access database.
Private Function CreateAccessDatabase() As Boolean
'This method is called to create a new Access database
Dim ADOXCatalog As New ADOX.Catalog
If Me.NewDBConnectionString.Trim.ToString.Length = 0 Then Throw New Exception("Connection string is not specified")
'Call create method to create a new database
Catch ex As Exception
If Not ADOXCatalog Is Nothing Then
ADOXCatalog = Nothing
The moment it created database, it is also leaving a .ldb file in the same directory. I don't want that .ldb file. If I tried to delete the file forcedly, it is passing an exception "The file is being used....". All the connection strings are properly closed.
I'm using a CheckedListBox in my project which is having checkboxes with their file name. An i want to show the checked file name into another ListBox. But I'm having some problems.
First, For checking a checkbox i've click double on a checkbox.So i'm not getting where should i place my code for checking the checkbox at a single click.........
Seconds, i've a variable sum=0 i want to add 1 in variable sum as the checkboxes are checked........... It's working fine but when i check my first record it shows 0 and when i check my second checkbox then it shows 1 but it must be 2 at the moment......................
First off, why don't you just have a button that will transfer all checked listboxes to the other listbox.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
I want to develop an application which can enter username and password to another application, for example from my custom application on press of a button username and password placed into msn messenger's username and password if msn messenger is open and its login screen too.
I have made a windows explorer , Which will show all the folders in the computer
Now on clicking a folder i want to get the images under it
I am able to get the list of images
The problem is displaying
I want to make a scrollable image viewer
I will be very much thankful if any suggestions or code is provided
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
Anyone know what to do about a BadImageFormatException in System.Windows.Forms.dll? My program worked just fine yesterday, then I changed a couple of string constants and a timeout value in a serial communications class, and now a timer.onTick event gives me this exception, before any of the changes I made are even used. Any ideas? All I know is that a BadImageFormatException means "something" is corrupted. I've tried cleaning and rebuilding my solution, reverting to the version from yesterday (still breaks), and compiling yesterday's version on another machine. All the same problem.
One thing that is odd. It works just fine in debug mode through the IDE. But release mode through the IDE, and both debug and release installs give me this exception. Also, I am not using generics (another cause I've found of this exception). I am also not loading any assemblies through my code.
You can only add a reference to a .NET or COM .DLL. You've apparently got your hands on a normal library .DLL. You'll have to get at the functions it using P/Invoke. In C#, you need to look into the DllImport attribute.