PreviousNext
Help > Easycom .NET > Easycom namespace > EasycomDataSet > EasycomDataSet.GetValue Method
EasycomDataSet.GetValue Method

 Get field values.

 

Class EasycomDataSet

 

Syntax

public Object EasycomDataSet.GetValue(Integer f)
public Object EasycomDataSet.GetValue(String flfName)

 

Description

 

These functions return the field value as an object. The object will be the nearest object type that corresponds to the database type of the field.

The Object can be a String, Integer, SmallInt, …

The value can be obtained from the field name or from the field index (zero-based). The field name is the alias name of the field if existing, except if short field names are forced using the connection string options.

 

 

Example of use (VB.NET)

Dim my_cnx As EasycomConnection

Dim my_file As EasycomFile

Dim result As String

 

my_cnx = New EasycomConnection

my_cnx.ConnectionString = "Server=194.206.160.111;User Id=

my_cnx.Open()

my_file = my_cnx.OpenFile("S_CUSTOMER")

my_file.ReadFirst()

result = my_file.GetValue("COMPANY").ToString() + " - " + my_file.GetValue("FIRSTNAME").ToString()

MessageBox.Show("Customer found : " + result)

 

Example of use (C#):

EasycomConnection my_cnx = new EasycomConnection();

my_cnx.ConnectionString = "Server=194.206.160.111;User Id=";

my_cnx.Open();

EasycomFile ecfile = my_cnx.OpenFile(“S_CUSTOMER”);

Ecfile.ReadFirst();

string result = ecfile.GetValue(“COMPANY”).ToString() + “ – “ + ecfile.GetValue(“FIRSTNAME”).ToString();

MessageBox.Show(“Customer found : “ + result);

 

See also

EasycomDataSet.ReadFirst

EasycomDataSet.ReadNext

EasycomDataSet.IsDBNull