How do I access MultiValue data from U2 Toolkit for .NET?

874 views Asked by At

I am getting the following message when trying to select * from the U2 data files.

[U2][UCINET][UNIDATA]:Multi-value or multi-subvalue are not supported in this version\r\n"

Is there a version that does not get this error, if I select only one field I do not get the error.

1

There are 1 answers

0
Rajan Kumar On BEST ANSWER

You need to set property "FirstNormalForm=false" in U2ConnectionStringBuilder Class. For example:

            U2ConnectionStringBuilder conn_str = new U2ConnectionStringBuilder();
            conn_str.UserID = "user";
            conn_str.Password = "pass";
            conn_str.Server = "localhost";
            conn_str.Database = "XDEMO";
            conn_str.ServerType = "UNIVERSE";
            conn_str.FirstNormalForm = false;

            U2Connection con = new U2Connection();
            con.ConnectionString = conn_str.ToString();
            con.Open();
            .......

For UniVerse Database: SQL Statement : SELECT FNAME,PRICE,BUY_DATE FROM UNNEST CUSTOMER ON ORDERS (PRICE and BUY_DATE are multi-valued attributes)

For UniData Database: SQL Statement : SELECT * FROM STUDENT UNNEST NL_ALL CGA (FNAME,...,SEMESTER are multi-valued attributes)