Skip to main content

Data links: Displaying alternate value on the fly

Comments

3 comments

  • Permanently deleted user

    Good morning Eric

    I guess the first question with the statement that you have included since I have not done any Datalinks to an MS-Access database is does the following work as a Datalink:

    SELECT MAT, GenreConstruction FROM rol_b00_tab WHERE MAT = ?

    Secondly does your statement work correctly when used in MS-Access ie take Geocortex  out of the picture.

    Regards

    Ralph

    0
  • Permanently deleted user

    Hi Ralph,

    Yes, I am able to run the Data Link command without the SWITCH in Gecortex successfully.  I also am able to run the query in MS Access with the SWITCH successfully although I using a slightly different format, as per the example (http://www.techonthenet.com/access/functions/advanced/switch.php) here :

    Const_Type: Switch([GenreConstruction]="1", "Home", [GenreConstruction]="5", "Condo")

    One correction from the OP, the command should be:

    SELECT MAT, Switch(GenreConstruction="1", "Home", GenreConstruction="5", "Condo") AS Const_Type FROM rol_b00_tab WHERE MAT = ?

    Nonetheless, I am still having the same issue.

    Thanks,

    Eric

    0
  • Permanently deleted user

    Hi Eric,

    It may be related to the use of double quotes (") vs. single quotes (').  You can try SELECT MAT, Switch(GenreConstruction='1', 'Home', GenreConstruction='5', 'Condo') FROM rol_b00_tab WHERE MAT = ?.  This may do the trick.  If it doesn't work, take a look in your Essentials log file ([ESSENTIALS_ROOT]\Latitude Geographics\Geocortex Essentials\Default\REST Elements\REST\App_Data\Logs) to see if there is an SQL error being logged when the data link tries to resolve.  It may be that the database driver you are using to connect to the MS Access database doesn't support the SWITCH statement.

    Colin

    0

Please sign in to leave a comment.