This document describes how to get started with development using the access provider for .NET. For clarity, code that is not necessary for the purpose of this document have been omitted. The full source code for this example is available here. The example used here shows how to query for a specific user.
To make the coding easier you can add a number of using statements at the top of the code file. This means that you can use classes the in these namespaces without having to prefix the class with the namespace.
using System; using Ifs.Fnd; using Ifs.Fnd.Data; using Ifs.Fnd.AccessProvider; using Ifs.Fnd.AccessProvider.PLSQL;
conn = new FndConnection(pars[0], pars[1], pars[2]);
FndPLSQLSelectCommand cmd = new FndPLSQLSelectCommand(conn,
"SELECT * FROM FND_USER WHERE DESCRIPTION LIKE :DESC");
cmd.BindVariables.Add(new FndBindVariable(FndBindVariableDirection.In, "DESC",
new FndTextAttribute("A%")));
conn = new FndConnection(pars[0], pars[1], pars[2]);
This is the basic way to fetch information from components built with the Extended Server platform. Please look at the full source code for this example to get the whole picture.
To compile the application use csc as shown below:
csc /reference:Ifs.Fnd.AccessProvider.dll;Ifs.Fnd.Data.dll;Ifs.Fnd.Core.dll PLSQLQueries.cs
The referenced dlls must be located in the same directory as the source file.
To run the application type PLSQLQueries.exe <connectstring> <identity> <password>
Example:
PLSQLQueries.exe lkprnd1:8080 starse mypassword
The output should be something as follows:
Alexander Danielsson Andy Jefferson Andre Hezzel Aretha Franklin Ann Pettersson Alan Newman - SM B2B User Alain Prost Annette Carlsson Ann-Cathrine Poopuu Achinee Walpita Adam Kosiorek Annika Fransson Anna Hofling Anders Jansson Ann-Katrin Johansson Anders Lif Alexander Schilling Albin Skinnars Anette Lundblad