Subject | Is it possible to implement OPENROWSET (SQL server 7) in IB 7? |
---|---|
Author | Clément Doss |
Post date | 2000-12-29T09:57:19Z |
Hi List,
Hope I'm in the right one!
Wouldn´t it be great to have such a function in IB7?
For those who are not familiar with it here is its syntax:
Includes all connection information necessary to access remote data
from an OLE DB data source. This method is an alternative to
accessing tables in a linked server and is a one-time, ad hoc method
of connecting and accessing remote data using OLE DB. The OPENROWSET
function can be referenced in the FROM clause of a query as though it
is a table name. The OPENROWSET function can also be referenced as
the target table of an INSERT, UPDATE, or DELETE statement, subject
to the capabilities of the OLE DB provider. Although the query may
return multiple result sets, OPENROWSET returns only the first one.
Syntax
OPENROWSET('provider_name'
{
'datasource';'user_id';'password'
| 'provider_string'
},
{
[catalog.][schema.]object
| 'query'
})
Example 1 (Accessing another SQLServer Database):
SELECT a.*
FROM OPENROWSET('SQLOLEDB','seattle1';'sa';'MyPass',
'SELECT * FROM pubs.dbo.authors ORDER BY au_lname, au_fname') AS a
Example 2 (Accessing a MS ACCESS Database from SQL Server!!!)
SELECT a.*
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'c:\MSOffice\Access\Samples\northwind.mdb';'admin';'mypwd',
Orders)
AS a
----
I believe this should be a great new feature for IB 7...
(Of course we could access a diferent IB Database using ODBC,
but I believe a NATIVE access would be great!)
Happy New Year!
Best regards,
Clément
Hope I'm in the right one!
Wouldn´t it be great to have such a function in IB7?
For those who are not familiar with it here is its syntax:
Includes all connection information necessary to access remote data
from an OLE DB data source. This method is an alternative to
accessing tables in a linked server and is a one-time, ad hoc method
of connecting and accessing remote data using OLE DB. The OPENROWSET
function can be referenced in the FROM clause of a query as though it
is a table name. The OPENROWSET function can also be referenced as
the target table of an INSERT, UPDATE, or DELETE statement, subject
to the capabilities of the OLE DB provider. Although the query may
return multiple result sets, OPENROWSET returns only the first one.
Syntax
OPENROWSET('provider_name'
{
'datasource';'user_id';'password'
| 'provider_string'
},
{
[catalog.][schema.]object
| 'query'
})
Example 1 (Accessing another SQLServer Database):
SELECT a.*
FROM OPENROWSET('SQLOLEDB','seattle1';'sa';'MyPass',
'SELECT * FROM pubs.dbo.authors ORDER BY au_lname, au_fname') AS a
Example 2 (Accessing a MS ACCESS Database from SQL Server!!!)
SELECT a.*
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'c:\MSOffice\Access\Samples\northwind.mdb';'admin';'mypwd',
Orders)
AS a
----
I believe this should be a great new feature for IB 7...
(Of course we could access a diferent IB Database using ODBC,
but I believe a NATIVE access would be great!)
Happy New Year!
Best regards,
Clément