Search VB 2010

Thursday, November 25, 2010

Visual Basic 2010 with MS-Access Database

Understanding ADO .Net for Visual Basic 2010 and Microsoft Access 2003 / 2007 Database

Visual Basic .Net and Ado.Net for MS-Access Database course online
There are two methods to work with MS-Access 2003/2007 Database (*.Mdb / *.Accdb) from Visual Basic 2010 using ADO .Net technology .
With .NET, Microsoft has released a new mechanism for accessing data: ADO.NET. The name is a carryover from Microsoft's ADO (ActiveX Data Objects) technology, but it no longer stands for ActiveX Data Objects--it's just ADO.NET. To avoid confusion, I will refer to ADO.NET as ADO.NET and to ADO as classic ADO.
If you're familiar with classic ADO, be careful--ADO.NET is not a descendant, it's a new technology. In order to support the Internet evolution, ADO.NET is highly focused on disconnected data and on the ability for anything to be a source of data. While you will find many concepts in ADO.NET to be similar to concepts in classic ADO, it is not the same.

Method (1) Online mode
Online-mode is just like the same old method we used to work with Databases from Visual Basic 6.0 and ADO2.8 version, all you need to do is :
    • Create Access Database and a Table with your fields.
    • Define the Database path
    • Include ADO2.8 Reference into the Visual Basic 6.0 project
    • Connect the Database
    • Open the Database
    • Operate your events (Save, Edit, Delete and find)
    • Exit the VB6 Project and you will find the data in the Table were affected if events were processed correctly in the VB6 Project.
 And the this is the same logic with ADO.Net in Visual Basic 2010 and MS-Access 2003/2007. The difference is in coding interface, but also the logic is the same some how, more than VB6 Coding, but more understandable.

An example to the Online-mode with MS-Access 2003, is the Friends_Info. Basic code to connect to a MS-Access Database  2003/2007 from Visual Basic 2010 using the ADO.Net Online-Mode is :
Visual Basic Online Courses

♦ Connect to and Open Database :

♦ Save Data into Table :

♦ Search for Data :

♦ Delete Data from Table :



Method (2) Offline mode
ADO.Net Offline Mode

You will see the difference now of using ADO technology only if you are familiar with classic ADO that we used to use in Visual Basic 6.0, but if you did not use it before that you won't.
ADO.Net Offline mode or the Disconnected method of working with Databases has a nice and easy logic :
♦ ADO.Net Offline mode works great with Client/Server applications
ADO.Net method is the preferred way to code client/server applications. The DataSet object is what the ADO.Net offline/Disconnected mode is all about, it gives you the ability to work on the Database components separately (it stores a Database copy in the Memory - RAM of the client machine while working on the Database components), so it gives you the ability to create multiple tables, fill them with data coming from different sources, enforce relationships between pairs of tables, and more.
 ♦ ADO.Net Offline mode is not recommended for ASP.Net
Though the Dataset is a great choice to work with Client/Server applications, but when working for example with ASP.Net live pages, it is a bad choise because the ASP.Net pages don't live long before they finish their lifetime cycle.
The above Friends Info VB.Net project using ADO.Net offline mode basic codes as follow :
Connect to and Open Database :

Save Data into Table :

Search for Data :

Delete Data :

I will discuss working with Crystal Reports for Visual Basic .Net in details in another post, starting Downloading SAP Crystal Reports until Packing SAP Crystal Reports and install it on the client's machine. Keep up !
Another topic about ADO.Net generally, is the ability to Create/Delete/Back-up Database, Add/Modify/Delete/Back-Up  Tables and Queries using the OpenSchema method. Let's see how to do this in Visual Basic .Net 2010.

VB2010 : To Create new Database using ADO.Net, you will need to add new reference to your project to  AdoX (Microsoft ADO Ext. 2.x for Dll and Security) ...
VS2010, ADOX, ADO.Net, MS-Access
Create new Database in Visual Basic 2010
VB2010 : To list all Database files from a Dir. into a TreeView control

VB2010 : To manage Tables using OpenSchema method

 VB2010 : To manage Fields using OpenSchema method

 

Some Visual Basic Exceptions and Solutions Working with MS-Access 2003/2007

Exception: "Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key Information"
Solution  :

Exception: "Syntax error (missing operator) in query expression ''He's')'.", while trying to Execute INSERT INTO Statement which carries String Values that contain Apostrophe like (He's)"
Solution :


Here are some online Visual Basic lessons and courses :

Wednesday, November 24, 2010

Visual Basic Online Course - Knowledge Base Introduction

In the name of Allah

Intro
Microsoft Visual Basic 2010, What is it?




Online Course about VB.Net 2010
Microsoft Visual Basic .Net (2010) Sp1
Microsoft published Visual Basic .Net 2010  In April 2010. Microsoft had planned earlier to use the Dynamic Language Run-time (DLR) for that version (2010), but shifted to a another mixed plan that includes both Visual Basic and sister language C# to bring both languages into closer parity with one another.
Visual Basic's innate ability to interact dynamically with Common Language Run-time CLR and COM objects has been improved to work with dynamic languages built on the DLR such as Iron-Python and Iron-Ruby. Visual Basic compiler was enhanced to infer line continuation in a set of common contexts, in many cases removing the need for the under score "_" line continuation symbol.
We offer free online courses for Visual Basic .Net and Visual Basic 6.0 Programming Languages and solutions for both beginners and professionals. If you have any questions please write it in a comment or join the Facebook.com page for more lessons, tips, courses and source codes.
Microsoft .Net Frame-Work, What is it?
VB.Net Online courses
Microsoft .Net Framework
The .NET Framework is a software framework developed by Microsoft that runs primarily on Microsoft Windows. It includes a large library and provides language that can use code written in other languages across several programming languages. Programs written for the .NET Framework execute in a software environment (as contrasted to hardware environment), known as the Common Language Run-time (CLR), an application virtual machine that provides services such as security, memory management, and exception handling. The class library and the CLR together constitute the .NET Framework.
The .NET Framework's Base Class Library provides user interface, data access, database connectivity, cryptography, web application development, numeric algorithms, and network communications. Programmers produce software by combining their own source code with the .NET Framework and other libraries. The .NET Framework is intended to be used by most new applications created for the Windows platform. Microsoft also produces an integrated development environment largely for .NET software called Visual Studio.
What can we do with Visual Basic .Net ?
online courses for vb.net
Visual Basic .Net products
Using visual basic .net, you can do almost everything, as a programmer you can always come up with your original ideas. I'm not talking about Visual Basic .Net tricks or what you can explore out of vb.net by yourself, I'm talking about creating profitable products.
You can earn money from your products (Desktop applications, Internet applications, Mobile applications), if you are starting learning Visual Basic from .Net version, then it's gonna be easy for you to gain so much knowledge, you will find yourself creating applications in no time, but if you already studied Visual Basic 6.0 then you can start .Net without a reference because the differences between both Visual Basic .Net and 6.0 are not about programming concepts or logic, the logic is the same, only the interface and the life-cycle.
Most of the hiring websites, those who pay money for programmers to create solutions using .Net languages or any other language are many. You can start taking a look at some of the websites that pay money for programmers to do some work for them. 




earn money programming
Earn money programming -
Programmer Jobs Online
Site name Site Link Description
Vworker
We are currently migrating all vWorker member accounts, balances and projects over to the Freelancer.com network. The migration is due for completion by 9:00am EDT on Wednesday November 21st, 2012
Freelancer
Freelancer.com (formerly GetAFreelancer, Scriptlance and vWorker/Rentacoder) is the world's largest freelancing, outsourcing and crowdsourcing marketplace for small business. Hire freelancers to work in software, writing, data entry and design right through to engineering and the sciences, sales and marketing, and accounting & legal services. Find freelance jobs and make money online! We have freelance coders, writers, programmers, designers, marketers and more. Getting the best web design, custom programming, professional writing or affordable marketing has never been easier!
Elane
Elance.com is the largest and most popular freelance platform for businesses looking to hire and work with top freelancers. Over 500,000 businesses and 2 million freelance professionals in more than 150 countries use Elance. Each year more than 1 million freelance jobs are completed through Elance, and to date our professional community has earned nearly $700 million
Odesk
Odesk.com is committed to helping you get quick access to the latest jobs that are relevant to you. This is why we are really excited to share a couple of new features to help contractors find jobs! Here’s the breakdown of all the enhanced features or watch our short video to learn more ....
Odesk.com has been recently [Dec, 2013] merged with [Elance.com], says Gary Swart [Odesk CEO]

All the above websites work like this, briefly:
Companies, shops, websites and individuals offer work for programmers to create a software solutions for their business. The above websites are free to sign-up with as a programmer "Contractor or service provider", once you've verified your identity online of using any mean the website offer you, you may receive job offer, job interview requests or even direct hiring from an owner (Job owner or service consumer).
There are several paying methods and working methods (I.e. Working part-time, hourly, predefined amounts or fixed amounts). You may be asked to open an account online or at a real bank to receive your payments.
As good and much feed-backs you get from your employer, the more work you will get in the future, programmers with good reference are on demand always.




Good luck. 

→ Next post :



Here are some online Visual Basic lessons and courses :

Visual Basic Courses - Share