Skip to main content

Visual Basic .NET Tutorial

Syntax error in UPDATE statement

While I was working with Visual Basic .NET by adding a form to manage user account in my system I found an error called “Syntax error in UPDATE statement”. After figuring out what’s the cause of this error I found out that it was the name of the field that is causing the problem. In my Users table I have the following fields: UserID Password CompleteName As you can see all of these fields are

Auto Generate Key

This tutorial will teach you on how to create a key automatically as a primary key in your table. It is sometimes needed to create your own key to format it on your own needs. Say for example you’d like to format it to start as four (4) digits rather than starting from one (1). The code herein is based on the code that I have already submitted on some of my program like hotel reservation system

How to Change the Database Password Programmatically?

This tutorial will teach you on how to change the database password of an Access database programmatically using visual basic 6.0. CN.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DatabasePath & ";Persist Security Info=False;Mode=12;Jet OLEDB:Database Password="current password here" sqlExecStr = "ALTER Database Password " & txtNewPass & " " & txtOldPass & ";" CN.Execute sqlExecStr Where