vb.net

Weekly Sales Report using Crystal Reports

The following source code will teach you on how to create a “Weekly Sales Report” using Crystal Reports. The most important part of this project is the use of SQL Statement. Here’s the statement that create a weekly sales report. SELECT TOP (100) PERCENT CONVERT(Varchar, DATEADD(WEEK, DATEDIFF(WEEK, CONVERT(DATETIME, '1900-01-01 00:00:00', 102), Date), CONVERT(DATETIME,

How to Change Connection String of VB.NET Project at Design Time

One of the problems that a beginner encounter when there is a project uploaded here, is they do not know on how to change the connection string that points to the correct database location. This is true with MS Access and even with SQL Server. Some programmers don’t add a code that will automatically change the location of the database just in case it will be ported in other machine.

Library System in Visual Basic .NET 2008 and SQL Server 2008

Here’s the full source code of the sample project, Visual Basic .NET 2008 Tutorial, I created this in addition with the tutorial that I've made several months ago. It is advised that you will follow the tutorial closely to understand how I created this project. There’s nothing so much information about this project for certainly, this project is not intended for advance programmer, thus it is

Correct Way to Open a Windows Form in VB.NET

Few months ago I encounter a problem with my windows form bound using a DataSet. When I open the form the first time, it seems that everything is fine. But when I open it again the second time, the fields are become blank. This happens when you trigger the “PerformClick” of “BindingNavigator” under the Form Load event.

This is not actually the common mistake that I encounter. But maybe, you encounter this problem also if you are used with VB 6.0 before.

Here’s the code to open the windows form the correct way:

How to Change Connection String at Run Time

One of the challenging parts in VB.NET is to change the connection string of your database location when you run your application.

This tutorial will help you solve this problem. This will apply only to SQL Server but it can be also modified easily to work with MS Access and other DBMS.

In my case I initialize this on the Form Load event on my Login form.