Logo Consyst, Link HomeTop BannerTo reduce your maintenance, To respect your budget, To deliver better, faster
  Home | Solutions & Products | Services | Partners | Support | | Company | Seminars | News | Log in |  

:: Support :: FAQ

General

General topic questions.

Questions

What are the constants that can be used in a SQL command?

How to execute a SQL command for a choice list or a join using a different connection than the primary data connection?

How to execute Rep++ framework for .NET commands in a Web page derived from PageEditor ?

How to activate the read-only mode to a Web page of an application using the Rep++ framework for .NET ?

How to force a refresh of the selection buffer in a Web application ?

After updating Rep++studio on the client machine, are there any other steps to take to complete the update process ?

How to find the type of a field programmatically ?

How can a SQL command be reused in different groups ?

Answers

What are the constants that can be used in a SQL command?

TThe following constants can be used in any SQL command. They are automatically replaced by their value prior to execution.

:K_APPSYSTNAME Current system name
:K_APPNAME Current program name
:K_LANGUE Current language
:K_USERCODE Current Protec user
:K_COMPANYCODE Current company code

Back to questions

How to execute a SQL command for a choice list or a join using a different connection than the primary data connection?

You first need  to define the new connection in SDTOOL. Then define the new SQL command atom in the Rep++studio SQL command editor using the following syntax:

atom_name:$CONNECT=connection_name

In your program, you need to open the connection as soon as possible using the Connection.Open method to allow your SQL commands  to execute properly. If two Connection objects exist for the same connection, the first object created will be used.

Back to questions

How to execute Rep++ framework for .NET commands in a Web page derived from PageEditor ?

You can execute framework commands in a Web page derived from PageEditor using, for example, the following command:
 …
ExecuteCmds("EDIT,NEXT");

Back to questions

How to activate the read-only mode to a Web page of an application using the Rep++ framework for .NET ?

The following code demonstrates how to set the read-only mode in a Web page derived from PageEditor.
    
protected bool ReadOnly {
    get {
        return (true);
    }
}
    
protected override void Render(HtmlTextWriter writer) {
    RepPP.Toolkit.Util.FldSelectableState     fldSelectableState;
        
    using(fldSelectableState = new RepPP.Toolkit.Util.FldSelectableState(TransactionGroupInstance.Group)) {
        if (ReadOnly) {
            ToolBarFW1.Items["New"].Visible = false;
            ToolBarFW1.Items["Duplicate"].Visible = false;
            ToolBarFW1.Items["Save"].Visible = false;
            ToolBarFW1.Items["Delete"].Visible = false;
            fldSelectableState.State = RepPP.Toolkit.Util.FldSelectableState.SelStateE.SS_None;
        }
        base.Render(writer);
    }
}

Back to questions

How to force a refresh of the selection buffer in a Web application ?

In any Web page that derives from PageWithSelectionBuffer, you may refresh the content of the selection buffer using the following statement:

SelectionBuffer.Refresh();

Back to questions

After updating Rep++studio on the client machine, are there any other steps to take to complete the update process ?

After updating the client machine, you usually have to update the repository and import the systems $SYSTEM and SDSTUDIO.

In order to do that, you need to start the SDTOOL program and connect to your repository. The title bar of the connection window indicates if the repository is up to date or not. In the latter case, the Wizard menu has a command to update the repository.

Once the repository is updated, the Import system option becomes available in the connection window. You need to import the two systems from the files:

  • xxx\rep\base\system.sys
  • xxx\rep\base\sdstudio.sys
where xxx is the installation directory of Rep++studio.

Back to questions

How to find the type of a field programmatically ?

The Rep++ Field object has a Type property that returns its type. The return value is defined in the RepPP.FieldType enumeration. Here is an example:

if (RepPPControl.Field.Type == RepPP.FieldType.sdFieldNumeric) {}

Back to questions

How can a SQL command be reused in different groups ?

Instead of using the name of the group in the INTO and WHERE clauses of the SQL commands, use the $AUTO special group name to indicate the current group. $AUTO works with choice lists and join SQL commands. Here is an example:

SELECT APPSYSTNAME
INTO :$AUTO.APPSYSTNAME
FROM SYSTAPP
WHERE APPNAME = :$AUTO.APPNAME

Back to questions

You can call our telephone support Monday through Friday, 9h to 17h30 (17h on Friday), at (514) 849-7431.

For technical questions or problems, write to support@consyst-sql.com.