NexusDB Provider - Access others DataBases
-
- Posts: 28
- Joined: Wed 24 Feb 2010 14:08
NexusDB Provider - Access others DataBases
Hi,
how can I access tables the others DataBases in NexusDB?
Ex: UniConnection ( ProviderName = 'NexusDB'
Server = '[email protected]'
DataBase = 'DataBase1' )
Select *
From DataBase1.Table1 T1
Join DataBase2.Table2 T2 on (T1.ID = T2.ID)
Thanks...
how can I access tables the others DataBases in NexusDB?
Ex: UniConnection ( ProviderName = 'NexusDB'
Server = '[email protected]'
DataBase = 'DataBase1' )
Select *
From DataBase1.Table1 T1
Join DataBase2.Table2 T2 on (T1.ID = T2.ID)
Thanks...
Hello,
You can execute query to several databases under following conditions:
1) the Nexus server must be running;
2) you must use aliases;
3) the TUniConnection.Server property must be set;
4) in the FROM SQL statement the name of the first alias must be equal to the alias that is set to the TUniConnection.Database property.
Here is a code example:
You can execute query to several databases under following conditions:
1) the Nexus server must be running;
2) you must use aliases;
3) the TUniConnection.Server property must be set;
4) in the FROM SQL statement the name of the first alias must be equal to the alias that is set to the TUniConnection.Database property.
Here is a code example:
Code: Select all
UniConnection.ProviderName := 'NexusDB';
UniConnection.Server := 'your_server';
UniConnection.Database := 'Alias1';
UniConnection.LoginPrompt := false;
UniQuery.SQL.Text := 'select * from Alias1.Table1 T1 Join Alias2.Table2 T2 on (T1.ID = T2.ID)';
UniQuery.Open;
-
- Posts: 28
- Joined: Wed 24 Feb 2010 14:08
Hello,
I can't execute cross schema(alises) commands with NexusDBProvider, but native nexus connection allow me to do it.
Ex:
UniConnection.ProviderName := 'NexusDB';
UniConnection.Server := 'my_server';
UniConnection.Database := 'Alias1';
UniConnection.LoginPrompt := false;
UniQuery.SQL.Text := 'select * from Alias2.Table2';
UniQuery.Open;
Return this error: Root table "Table2" not found [$2728/10024]
I'm use NxServer version 3.07
I need to do it without put another UniConnection on application, cause It will run with sqlserver and nexus.
There is some way to do it?
Thanks
I can't execute cross schema(alises) commands with NexusDBProvider, but native nexus connection allow me to do it.
Ex:
UniConnection.ProviderName := 'NexusDB';
UniConnection.Server := 'my_server';
UniConnection.Database := 'Alias1';
UniConnection.LoginPrompt := false;
UniQuery.SQL.Text := 'select * from Alias2.Table2';
UniQuery.Open;
Return this error: Root table "Table2" not found [$2728/10024]
I'm use NxServer version 3.07
I need to do it without put another UniConnection on application, cause It will run with sqlserver and nexus.
There is some way to do it?
Thanks
-
- Posts: 28
- Joined: Wed 24 Feb 2010 14:08
-
- Posts: 40
- Joined: Thu 27 Jan 2011 22:31