Posts

Showing posts from 2011

Solution - There is already an open DataReader associated with this Command which must be closed first.

Image
OleDB Error There is already an open DataReader associated with this Command which must be closed first. OleDB Error : There is already an open DataReader associated with this Command Problem There is already an open DataReader associated with this Command which must be closed first. Cause Having more than 1 dataReader result set working at the same time . Solution In my solution example, I work with Sql Server 2000 and VB.Net 2005  The VB. Net Example Project can be downloaded at the end of this post It contains (Sql Server 2000 DataBase - VB.Net Project) The example shows how to : Navigate (First Record - Next Record) using ADO Net 2.0 Online-Mode using SqlClient DataReader ... Sql Database Name : Market Sql Database Table : Market.Info Server Name : evry1falls (in order to see the example correctly, you'll have to Import the Database 'Market' into your sql server 2000 Enterprise Manager) Photo1 : Applica

Visual Basic 2010 Math Functions

Image
Microsoft Visual Basic 2010 Math Functions Visual Basic 2010 Math functions Math and String Functions In addition to performing simple arithmetic and string operations with the arithmetic and string operators, Visual Basic programs can take advantage of several built-in  mathematical functions  and  string functions to perform useful processing that, otherwise, could require highly complex original code. Mathematical Functions Popular mathematical functions are summarized in the following table. Note that certain functions do  not  require the  Math.  prefix. Function Use Math.Abs() Returns the absolute value. Math.Abs(-10)  returns  10 . Math.Ceiling() Returns an integer that is greater than or equal to a number. Math.Ceiling(5.333)  returns  6 . Fix() Returns the integer portion of a number. Fix(5.3333)  returns  5 . Math.Floor() Returns an integer that is less

Visual Basic Online Courses DataGridView Add Edit Delete

Image
VB .NET DataGridView Add Edit Delete Manipulate DataGridView from Visual Basic 2010 with SQL Server Visual Basic Online Course - DataGridView SQL Server Database Note : if you dunno how to work SqlServer With VB.Net : You need to see  this  then  this Logic Using DataGridView Control In VB.Net to Add New - Edit - Delete from/to Sql Server Database or MS-Access or any other Database type. You will find in the end of the lessons the project to download along with source code .  Design 1) Create a new Visual Basic project (Windows Application) name it as (MyDg1) and save it to your hard drive. 2) Place a DataGridView Control on the Form1. 3) Create Sql Server Database file, name it (MyDB) 4) Create Table, name it (Kinds) with just one record, name it (Kinds) 5) Rename the DataGridView Control's name From (DataGridView1) to (DG1) 6) Save/Build the project . 7) Now you have : A project such as this one in the 3 photos (from inside VB.Net and

No error message available, result code: DB_SEC_E_AUTH_FAILED(0x80040E4D).

Image
No error message available, result code: DB_SEC_E_AUTH_FAILED(0x80040E4D). No error message available, result code: DB_SEC_E_AUTH_FAILED(0x80040E4D). Problem : No error message available, result code: DB_SEC_E_AUTH_FAILED(0x80040E4D). Cause : Your VB .Net project ConnectionString is invalid. There is something wrong in your code (i,.e : Provider Name, Database  Path, Database Name) but not before compiling. For Example if you change the database folder at Run-time. Solution  : Store your ConnectionString in Settings (Project Properties->Settings). This will also keep you safe from ConnectionString Injections. ♥  Here are some online Visual Basic lessons and courses : Visual Basic .Net snippets collection Visual Basic .Net - How to check for the internet connection Visual Basic .Net - POP3 and Receiving E-mails Visual Basic .Net - Generate Random Combinations Visual Basic .Net - Play sounds on Button Click or Mouse Hover Visual Basic .Net - Progressbar

DAO in VB .NET MS ACCESS Database

Image
How to connect Access Database using DAO In VB  .Net vb .net DAO Data Access Object (DAO) According to Microsoft Docs  , Conversion from DAO TO ADO : Versions of the DAO library prior to 3.6 are not provided or supported in Access. Also : ODBCDirect workspaces are not supported in Microsoft Access 2013. Use ADO if you want to access external data sources without using the Microsoft Access database engine. DAO is used with Access databases and is supported through Office 2013. DAO 3.6 is the final version, and it is considered obsolete. These classes work with the other application framework classes to give easy access to Data Access Object (DAO) databases, which use the same database engine as Microsoft Visual Basic and Microsoft Access. The DAO classes can also access a wide variety of databases for which Open Database Connectivity (ODBC) drivers are available. Programs that use DAO databases will have at least a CDaoDatabase object and a CDaoRecordset object. DAO 360 dll Data A

VB 2010 Create Controls at Run-Time with events

Image
How to Create Controls at Run-Time in  VB 2010 Visual Basic Online Course Logic The example will show you how to create a control (TextBox) at the Application Run-Time . This TextBox will allow only Numbers. We will create a new TextBox control with event  Text Changed when the form is clicked Project Design Create new VB 2010 Windows Application Project ( MyPro ), don't forget to always Save your project How does it work You RUN your project and then click on the Form ( Form1 ) and then you will notice that a TextBox control was created with the same properties that we provided in our example in the code below. TextBox Properties Location : The cursor location when click on the Form1 Size : 120,300 Parent : Form1 (Me) TextAlign : HorizontalAlignment.Left ForeColor : Color.White Na

Visual Basic Online Course - OOP

Image
V isual B asic O nline C ourse - OOP Visual Basic 2010 OOP OOP Introduction The original versions of Microsoft® Visual Basic® provided a mechanism for defining data structures in a user-defined type (UDT). A UDT encapsulates the data, but not the processing associated with that data. Processing was defined in global standard modules, often called BAS modules because of their .bas extension. The release of Visual Basic 4 dawned a new age for Visual Basic developers. Visual Basic took its first steps toward becoming an object-oriented programming (OOP) language by providing object-oriented features such as class modules.  A class module defines data as properties and the processing associated with that data as methods. By defining a class for each business entity, encapsulating data in properties and processing in methods, Visual Basic developers had object-based development. As Visual Basic evolved from

Visual Basic Online Course - Activate Visual Studio 2005

Image
In the name of ALLAH, the most Gracious and the most Merciful MS Visual Studio 2005 Activation and Serial Number MS-Visual Studio 2005 Activation Microsoft Visual Studio 2005 History Visual Studio 2005, codenamed Whidbey (a reference to Whidbey Island in Puget Sound), was released online in October 2005 and to retail stores a few weeks later. Microsoft removed the ".NET" moniker from Visual Studio 2005 (as well as every other product with .NET in its name), but it still primarily targets the .NET Framework, which was upgraded to version 2.0. It is the last version available for Windows 2000 and also the last version to be able to target Windows 98, Windows Me and Windows NT 4.0 for C++ applications. Visual Studio 2005's internal version number is 8.0 while the file format version is 9.0. Microsoft released Service Pack 1 for Visual Studio 2005 on 14 December 2006. An additional update for Servi