Visual Basic .NET Tutorial

  • Submitted by: 
    When you add a DataSet to your Windows Form a BindingNavigator is automatically created with navigation to your record and it also includes Delete and Add button. When you click the Delete button there is no confirmation if you want to cancel the operation. The solution to this is to set the DeleteItem to None. See screenshot below: Here's the code in the Delete button under BindingNavigator:...
  • Submitted by: 
    Sometimes you need to know the value of your Primary Key when you insert record in your table. This is true if you have a Master/Detail form and you need to know the Primary key value of the parent table so that you can insert rows in the related table. Consider the following scenario: You have and Invoice table with InvoiceDetails as the related table. Invoice table has primary key named “...
  • Submitted by: 
    This tutorial will teach you on how to create reports in Visual Basic .NET 2008 using Crystal Reports. This is a step by step guide on how I create the report on "Weekly Sales Report using Crystal Reports". This guide is not intended for advance user. So please don't react if you find a basic explanation on this tutorial. This assumes that you have already attached the database that is included...
  • Submitted by: 
    If you encounter the following error: System.Data.InvalidConstraintException: ForeignKeyConstraint FK_foreign_key_name requires the child key values (-1) to exist in the parent table. Or The INSERT statement conflicted with the FOREIGN KEY constraint "FK_foreign_key_name ". The conflict occurred in database "YourDatabase", table "dbo.Tablename", column 'YourPrimaryKey'. The statement has been...
  • Submitted by: 
    Hi this is Vb.net connect sql server using TCP/IP before run this program you need to install a vb.net 2008 and sql server 2008 here in example code: Hi you need to do this click all program/ ms sql server 2008 / configuration tool then click SQL server configuration manager select you server name then rigth click properties you need to enable a TCP and IP add then Restart
  • Submitted by: 
    Imports System.Data Imports System.Data.SqlClient Public Class frmRID Dim sCommand As SqlCommand Dim sAdapter As SqlDataAdapter Dim sBuilder As SqlCommandBuilder Dim sDs As DataSet Dim sTable As DataTable Private Sub cnew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cnew.Click Call main() Con.Open()
  • Submitted by: 
    Sometimes we need to store some data or files under %appdata%. If you are using Windows 7 you can find this folder under C:\Users\Username\AppData. AppData is a folder used to store information like cookies, Libraries, program settings, temporary files, templates, etc. By using this folder you are certain that your settings are being protected by Windows. To access this folder, all you have to do...
  • Submitted by: 
    Complete CREATE,READ,UPDATE AND DELETE USING MS ACCESS DATABASE... SIMPLE BUT IT IS WORKING. JUST CHANGE THE CONNECTION STRING TO ACTIVATE THE CONNECTION. gudluck sa programming Guys... Happy Codings...
  • Submitted by: 
    I just want to share with you the code that I have found on the internet on how to open a Cash Drawer using VB.NET. I am in no way claim this code as my own work. I want to share this with you because there’s a lot of question on the internet on how to open a Cash Drawer on VB.NET. The code will simply open the cash drawer using either the LPT port or COM port.
  • Submitted by: 
    In my previous tutorial using DataGridView Control I explained on “ How to Differentiate Two Cell Values in DataGridView Control ”. This time I will teach you on how to calculate two columns in DataGridView Control. This tutorial is very useful if you want to make a total of the two columns. For example a total of “Qty” and “Sales Price” Column. Additionally, we will make a total of the “Amount”...

Pages