iSeries/i5 Cool Things.
Home Books Tips & Tricks Links Blog Contacts


Read records from the 400
And Display in an HTML Table

�� It�s AMAZINGLY easy to create an Active Server Page to retrieve data from a file on the 400 and display those records in an HTML Table. If you have been given the task of creating web pages that access your iSeries data, you'll want to take a serious look at Active Server Pages. If you're running a Windows NT or 2000 server at your office, you already have all of the software you need. Data access from an ASP is simple. ActiveX Data Objects (ADO) and IBM�s OLE DB provider for the 400 make this possible. There are a few requirements that need to be met to perform this. First off, you need to have a machine running Microsoft Internet Information Server (IIS). This machine must also have Client Access Express (V4R4M0 or higher) installed. The box below contains the source for an Active Server Page that uses a Server Side VB Script to read data and display it in the browser. Either select the text above and copy it to the clipboard and paste it into a new active server page document or click here to download the source in a text file.� In this example, replace the SYSNAME value with the system name or IP address of your iSeries or AS/400.�� You will also need to use a valid user ID and password for your system.� We first create the connection to the 400 using the IBMDA400 OLE DB provider.� Next we use this connection along with a simple SQL SELECT statement to select the fields to be displayed on our page.� This part is important because the example here will display all of the fields in the selected data source.� This allows us to use this same peice of code over and over again.� The only part that changes is the SELECT statement.� This example gives you the basic building blocks of using ADO and OLE DB from within an Active Server Page. For even MORE examples on using ASP with the iSeries, AS400 and i5, including two complete ASP applications, check out "Active Server Pages Primer" from MC Press

| Home | Books | Tips & Tricks | Links | Blog | Contact |

Hosted by www.Geocities.ws

1