I'm having problems accessing UniData data from the u2.net toolkit. I can connect normally - I checked the connections to the "Test Connection Tool" and in the code, both connections work fine. My problem is that when I try to populate a dataset - using the sample code: I get this error:
[U2][UCINET][UNIDATA]:You have no privilege on file THENAME
Here is the code:
U2Connection con = new U2Connection(); try { U2ConnectionStringBuilder conn_str = new U2ConnectionStringBuilder(); conn_str.UserID = "id"; conn_str.Password = "pwd"; conn_str.Server = "srv2"; conn_str.Database = "DB.XXX"; conn_str.ServerType = "UNIDATA"; conn_str.RpcServiceType = "udserver"; con.ConnectionString = conn_str.ToString(); con.Open(); DataTable schema = con.GetSchema(); U2DataAdapter da = new U2DataAdapter("SELECT * FROM THENAME ", con); DataSet ds = new DataSet(); da.Fill(ds); } catch (Exception ex) { string lStr = ex.Message; } finally { con.Close();
1 again, I have an ODBC connection setup. Through ODBC, I can use the same credentials inside the linked SQL Server to successfully receive the same query. Any ideas would be appreciated.
source share