문제

We have a legacy system running on Universe DBMS 9.6 . We are trying to export data from it and we have enable rpc daemon so that we can connect via odbc.

Now we are able to connect to the server but we are not able to run any queries. We are getting following error

query - SELECT * FROM DEBTOR

exception - UniVerse/SQL: syntax error. Unexpected symbol. Token was ";". Scanned command was SELECT

There are two types of database in universe ie Table and File based. But we are able to query the table based database but we cannot query File based and there are some configurations that will enable querying the File based ones. We are stuck at this place.

Using u2Client library in c# to access the db. Any help is appreciated

Code used to connect Universe

 U2ConnectionStringBuilder conn_str = new U2ConnectionStringBuilder();
 conn_str.UserID = "id";
 conn_str.Password = "pwd";
 conn_str.Server = "serverIP";
 conn_str.Database = "DBNAME";
 conn_str.ServerType = "UNIVERSE";
 conn_str.Pooling =false;
 conn_str.AccessMode = "Uci";
 conn_str.RpcServiceType = "uvserver";
 string s = conn_str.ToString();
 U2Connection con = new U2Connection();
 con.ConnectionString = s;
 con.Open();
 Console.WriteLine("Connected.........................");
 U2Command xmd = new U2Command("SELECT * FROM TABLE_NAME", con);
 var op = xmd.ExecuteReader();

Exception catches while executing the last statement

도움이 되었습니까?

해결책

We tried a driver from Rocket software Universe side is working and it is sending the data to the client but client cant understand the protocol or some error that causes exception . We confirmed that the server responded to the query with data by checking the TCP packets. But we are out of luck.

So we decided to create our own software which is developed in Universe Pick Basic which will be connected to external system via ssh and created a new protocol that both client and server understands it. And we succeeded ,now we can export and import data to universe.

다른 팁

Officially Universe 9.6 isn't supported for use with the U2 Toolkit for .NET. Per the documentation (page 6):

Supported versions of UniData and UniVerse

  • UniData 7.1 or later
  • UniVerse 10.3 or later

You can still use straight ODBC or UniObjects to extract data from your database. If you're planning to use ODBC, in addition to enabling RPC, make sure you have configured your Universe account for ODBC per Rocket's ODBC documentation. Before writing C# code, I have often verified my ODBC setup using Excel's external data access tools.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top