Archive for the ‘Appserver Rule’ Category

How to get the deleted rows from SaveFormData

September 10, 2007
IRRecordset2 rstDeleted;
rstDeleted = (IRRecordset2) pForm.SecondaryFromVariantArray(
                                    Recordsets, “Assistants”);
foreach (object deletedId in rstDeleted.DeletedRecordIds)
    //Do Something with your id here

How to get Pivotal Connection String

April 11, 2007

The C# code below shows us on how to build the trusted connection string from the registry stored by Pivotal.

using Microsoft.Win32;


private string GetConStringByPivotalSystem(string systemName)


    string pivotalKey =


            + systemName;

    string odbcKey = “SOFTWARE\\ODBC\\ODBC.INI\\”;

    string sODBC;

    string serverName;

    string dbName;


    RegistryKey key =

       Registry.LocalMachine.OpenSubKey(pivotalKey, true);


    sODBC = Convert.ToString(key.GetValue(“User Data”));


    odbcKey = odbcKey + sODBC;

    key = Registry.LocalMachine.OpenSubKey(odbcKey, true);

    serverName = Convert.ToString(key.GetValue(“Server”));

    dbName = Convert.ToString(key.GetValue(“Database”));

    return “Data Source=” +

                serverName + “;Initial Catalog=” +

                dbName + “;Integrated Security=SSPI;”;