3
Answers

How to show text , value is an integer in database

albert albert

albert albert

10y
605
1
Hi everybody,

I have tree Radiobuttons. and an database field: ActionDefinitionActivityType that has three integer values: 1,2,3.

In the aspx form I get the values: 1,2,3 depending what you have selected.

But I want to have text showing for: 1 - Overig, 2-werk, 3-reizen.

I have this as code:

[code]
Sub DataToForm(ByVal dataobj As DataLayer.DataObject)
        With dataobj


            txtActionDefinitionDescription.Text = .GetVal("ActionDefinitionDescriptionNL")
            txtActionDefinitionDescriptionDE.Text = .GetVal("ActionDefinitionDescriptionDE")
            txtActionDefinitionDescriptionFR.Text = .GetVal("ActionDefinitionDescriptionFR")
            txtActionDefinitionDescriptionUK.Text = .GetVal("ActionDefinitionDescriptionEN")
            txtNL.Value = .GetVal("ActionDefinitionDescriptionNL")
            txtDE.Value = .GetVal("ActionDefinitionDescriptionDE")
            txtFR.Value = .GetVal("ActionDefinitionDescriptionFR")
            txtEN.Value = .GetVal("ActionDefinitionDescriptionEN")


            If .GetVal("ActionDefinitionActivityType") = 1 Then
                InputRadioButton1.Checked = True
            End If
            If .GetVal("ActionDefinitionActivityType") = 2 Then
                InputRadioButton2.Checked = True
            End If
            If .GetVal("ActionDefinitionActivityType") = 3 Then
                InputRadioButton3.Checked = True

            End If
        End With
    End Sub
[/code]

So if you select 1 you see in the view(aspx Form) 1, but you have to see: overig

THank you


Answers (3)
0
Suthish Nair

Suthish Nair

NA 38.4k 4.6m 13y
another duplicate
0
John Penn

John Penn

NA 4.2k 134.4k 13y
Yes.  You can create a select query that specifies the columns you want:

SELECT FirstName, LastName FROM Person

If "Person" has an identity column, you won't see it in the resultset.