IBM DB2 LUW or DB2 Linux Unix Windows is one of a recommended RDBMS software used by many organizations.
By its name this DB2 LUW is a platform independent because it can be run on Linux, Windows, Solaris, Mac OS.
IBM has free version of DB2 LUW which is DB2 Express-C. Unlike another RDBMS, DB2 Express-C does not have any time restrictions or database size limitations.
So this free version can be used in production environment.
Because of platform independent we can install DB2 server on Linux as database server to avoid virus infection. Since MS Windows is more widely used (at least in my country) then we also can use MS Windows to run client application (VB.Net) that connect to DB2.
I will show you example using VB.Net to work with DB2 and also to get image data.
DB2 .Net Data Provider
IBM provides .Net Data Provider for DB2. It is located on installation of DB2 folder like C:\Program Files\IBM\SQLLib\Bin\netf20\IBM.Data.DB2.dll. I added this library file to project’s reference.
I use DB2Connection class to establish connection to DB2. DB2DataAdapter to retrieve recordset and DB2Command to execute sql query.
I use SAMPLE database and populate DataGridView with Employee data. If employee has a photo then it will be showed on picture box.
Please refer to this pic below:
Posted in DB2, Visual Basic .Net
Tagged Database, DataGridView, DB2, DB2 LUW, DB2Command, DB2Connection, DB2DataAdapter, IBM.Data.DB2.dll, MemoryStream, VB .Net, Visual Basic
SSRS can use Custom Code to have more flexible way to achieve complex tasks like calculation, conditional result, and also accessing records on database.
Custom Code use System.Data Class to work with database which means read a records. This class have to be registered in SSRS config file and also have to be referenced in Report file.
In this blog post I will show you on how to read sql server record using SSRS Custom Code. I use SQL Server 2005 Express Edition and the database is AdventureWorks sample database.
I will list all Product Category with count number of product in specific category. I use Custom Code to calculate how many of product in category.
Here’s how to make Database enabled SSRS Custom Code:
Updating multiple data at multiple rows in table is very often process on web application. Especially on interal / private system.
We have to make a grid like excel to do that. User inputs their data into multiple textboxes in rows / cells then clicks submit button to update those data at once.
Asp.Net server input control has many ways to access list of textboxes. Not only using array like asp classic do but we can do it using repeater / listview / gridview / table control as a grid creator and use
FindControl method to access control inside grid including textboxes.
I have an example to update email of many customers so that when submit button is clicked then related email textboxes text will be stored on database.
I use VS 2010 and my local SQL Express 2005 with Northwind sample database to make this example.