Search VB 2010

Showing posts with label Visual Basic 2010 online courses. Show all posts
Showing posts with label Visual Basic 2010 online courses. Show all posts

Tuesday, April 14, 2015

VB 2010 MS Access Compact and Repair Database



MS Access 2003/2007/2010 Compact and Repair

VB.Net Compact and Repair Database - MS Access

Neither ActiveX Data Objects (ADO) nor ADO .NET provide the means to compact or repair Microsoft Access databases. However, you can accomplish this task by using the Microsoft Jet OLE DB Provider and Replication Objects (JRO) that was introduced with Microsoft Data Access Components (MDAC) version 2.1. ADO .NET allows the use of COM-based object libraries through the Interop layer.

This article demonstrates how to compact an Access database by using Visual Basic .NET.

Requirements

  • Microsoft Visual Basic .NET
  • Microsoft Jet and Replication Objects 2.1, 2.5, or 2.6 Library

Steps to build example

  1. Open a new Visual Basic .NET console application.
  2. In the Solution Explorer window, right-click the References node and select Add Reference.
  3. In the Add Reference dialog box, click the COM tab, and then select Microsoft Jet and Replication Objects 2.x Library. Click Select to add it to Selected Components. Click OK.

    Note In this step, x is a placeholder for the actual version number of the Microsoft Jet and Replication Objects Library component.
  4. A warning will be displayed if there is no wrapper found for the selected library. Click Yes to generate a wrapper. Microsoft ActiveX Data Objects Library (ADODB) and JRO references will be added to the project's References.
  5. In the Solution Explorer window, right-click Module1.vb and click View Code.
  6. Delete all of the code from the code window.
  7. Copy the following code and paste it into the code window: 
  8.  

     
  1. Change the path to the Source and Destination .mdb files as appropriate. Press F5 to build and run the project.

    The compacted database will be in Access 2000 (Jet 4.0) format. For a different Jet format, see "References."

Pitfalls

In order to compact a database, the Jet Database Engine requires exclusive access to the database file. Attempting to compact a database file that is currently in use will result in an exception. This exception can be caught using a Try...Catch structure.

Tuesday, January 08, 2013

Visual Basic Online Course - Reading / Receiving E-mails in Vb.Net

Visual Basic Online Course - Reading / Receiving E-mails in Vb.Net


I was able to finish the (send E-mail) part successfully, though I've not finished the attachment and the Html parts yet, but the (receiving / reading E-mails) part still out there somewhere I did not do it, though I managed to connect to POP3 servers and receive the +OK response successfully.

Full source code and tutorial about receiving E-mails using VB.net 2010 and POP3 Commands
1) Understanding E-mails - Settings - Start Coding
2) Receiving response from POP3 server
3) Retrieving the number of E-mails from your [Inbox]
4) Solving the POP3 connect\disconnect without errors
5)  Source Code Download
Notes :
-In order to get fully understanding to this topic, you need to read the whole 5 sections as they are already a summary to what i found there.
-There is no direct source code application using VB.Net to receive E-mails from POP3 Client, only this one is available.
- Microsoft did not offer a built-in function that enables you to receive E-mails Using POP3 Commands, so this is just a work around solution and it was tested on Hotmail.com and Gmail.com.
- Gmail.com sometimes uses a 2-steps verification methods, so i had to work that too here.

ENJOY
Regards/ Evry1falls

Visual Basic Courses - Share