After migrating from old versions, some of the macros written using COM access provider do not work anymore.
Page 1 / 1
If your macro script made connections to Application Server via COM access provider, then they will not work anymore in App9/App10 as IFS does not provide COM Access Provider API from IFS Applications 9. .NET Access Provider is the recommended client based access provider in IFS.
However, for COM client users, IFS has provided an option to access .NET Access Provider while using a COM client.
As Macros make reference through creating objects by reference names, changing those reference name to be compatible with .Net Access provider would resolve this problem.
Note that IFS .NET Access Provider must be installed in client machine prior to executing macro such as mentioned in this case. Installation file for IFS .NET Access Provider.msi can be found in
instance\\client\runtime
Below is an example macro code written in VB.net to query the database using .NET access provider. There can be several ways to write this.
However, for COM client users, IFS has provided an option to access .NET Access Provider while using a COM client.
As Macros make reference through creating objects by reference names, changing those reference name to be compatible with .Net Access provider would resolve this problem.
Note that IFS .NET Access Provider must be installed in client machine prior to executing macro such as mentioned in this case. Installation file for IFS .NET Access Provider.msi can be found in
instance\\client\runtime
Below is an example macro code written in VB.net to query the database using .NET access provider. There can be several ways to write this.
code:
Sub Main()
Dim oFndConnection, oSelectCmd
Dim text As String
Set oFndConnection = CreateObject("Ifs.Fnd.AccessProvider.FndConnection")
oFndConnection.ConnectionString = "https://**********:58080"
oFndConnection.SetCredentials "username", "password"
Set oSelectCmd = CreateObject("Ifs.Fnd.AccessProvider.PLSQL.FndPLSQLSelectCommand")
oSelectCmd.Connection = oFndConnection
Set oBindVarDesc = CreateObject("Ifs.Fnd.AccessProvider.PLSQL.FndBindVariable")
Set oFndTextAttr = CreateObject("Ifs.Fnd.Data.FndTextAttribute")
oFndTextAttr.SetValue "A%"
Set oFndDataTable = CreateObject("Ifs.Fnd.Data.FndDataTable")
oBindVarDesc.Direction = 0
oBindVarDesc.Name = "DESC"
oBindVarDesc.Value = oFndTextAttr
oSelectCmd.CommandText = "SELECT * FROM FND_USER WHERE DESCRIPTION LIKE :DESC"
oSelectCmd.BindVariables.Add (oBindVarDesc)
Set oFndDataTable = oSelectCmd.ExecuteReader()
For Each Row In oFndDataTable.Rows
text = text & Row.ToString()
Next
MsgBox text, vbOKOnly
End Sub
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.