Re: .Net Provider for DB2 in HIS 2006
- From: PDOlsen <PDOlsen@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 1 Dec 2006 09:30:01 -0800
Ken,
Thanks for the help.
I wrote the following little Console program to get the iSeries DB2 Schema
for a Database called YUKONTEST and it gives me back all of the tables and
views as expected:
using System;
using System.Data;
using Microsoft.HostIntegration.MsDb2Client;
class Program
{
static void Main(string[] args)
{
using (MsDb2Connection connection = new MsDb2Connection("User
ID=DEVPDO;Password=XXXXXXX;Initial Catalog=YUKONTEST;Network Transport
Library=TCP;Host CCSID=37;PC Code Page=1252;Network
Address=192.168.10.14;Network Port=446;Package Collection=YUKONTEST;Default
Schema=YUKONTEST;Process Binary as Character=False;Units of Work=RUW;DBMS
Platform=DB2/AS400;Defer Prepare=False;Rowset Cache Size=0;Persist Security
Info=True;Connection Pooling=False;Derive Parameters=False;"))
{
// Connect to the database then retrieve the schema information.
connection.Open();
DataTable table = connection.GetSchema("Tables");
// Display the contents of the table.
DisplayData(table);
Console.WriteLine("Press any key to continue.");
Console.ReadKey();
}
}
private static void DisplayData(System.Data.DataTable table)
{
foreach (System.Data.DataRow row in table.Rows)
{
foreach (System.Data.DataColumn col in table.Columns)
{
Console.WriteLine("{0} = {1}", col.ColumnName, row[col]);
}
Console.WriteLine("============================");
}
}
}
==================================================
The Data Source in Analysis Services is as follows:
<DataSource xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2"
xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2"
xmlns:dwd="http://schemas.microsoft.com/DataWarehouse/Designer/1.0"
xsi:type="RelationalDataSource"
dwd:design-time-name="a896c042-7b9a-426e-ae30-0792ed1ccc3e"
xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<ID>SILVON5_YUKONTEST</ID>
<Name>SILVON5_YUKONTEST</Name>
<CreatedTimestamp>0001-01-01T05:00:00Z</CreatedTimestamp>
<LastSchemaUpdate>0001-01-01T05:00:00Z</LastSchemaUpdate>
<ConnectionString>User Id=;Password=;Initial Catalog=A10A335C;Network
Transport Library=TCPIP;Host CCSID=37;PC Code Page=1252;Network
Address=192.168.10.14;Network Port=446;Package Collection=YUKONTEST;Default
Schema=YUKONTEST;Process Binary as Character=False;Time Out Value=0;Units of
Work=RUW;DBMS Platform=DB2AS400;Use Early Metadata=True;Defer
Prepare=False;Persist Security Info=True;Derive
Parameters=False;Pooling=False;Rowset Cache Size=0</ConnectionString>
<ConnectionStringSecurity>PasswordRemoved</ConnectionStringSecurity>
<ImpersonationInfo>
<ImpersonationMode>ImpersonateAccount</ImpersonationMode>
<Account>DEVPDO</Account>
<ImpersonationInfoSecurity>PasswordRemoved</ImpersonationInfoSecurity>
</ImpersonationInfo>
<Isolation>Snapshot</Isolation>
<ManagedProvider>Microsoft.HostIntegration.MsDb2Client</ManagedProvider>
<Timeout>PT0S</Timeout>
</DataSource>
=========================
I pasted the Connection strings from the working code to the Analysis
Services code so they are basically the same with the exeption of a few
changes like stripping out the User ID and the Password in the AS code.
FYI - This same process works with a 3rd party .Net provider. It would be
great to know if any one at Microsoft could try out this new provider and see
if they can get it to work.
Thanks for your help.
Paul
"Ken Kwok [MS]" wrote:
Nothing has been tested on this provider so I am not sure what problem here..
Are they having same connection string? and check permission as well.
You can try open the oledb connection and use connection.GetSchema("Tables")
in code and see if you get anything.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Ken Kwok
SQL Server Analysis Services
"PDOlsen" <PDOlsen@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:750BED72-D238-4F43-8752-66F5E99B6E06@xxxxxxxxxxxxxxxx
I am trying to Create a Data Source View with a Data Source using the .Net
provider that comes with Host Integration Server 2006. It is called
Microsoft.HostIntegration.MsDb2Client. When I use it with VS2005 in code
it
retrieves iSeries DB2 data without any problems. I can create a Data
Source
and I get a successful connection. However, when I try to create a new
data
source view it does not retrieve any tables from the library and the
Select
Tables and Views screen is completely empty.
I am not sure how to figure this one out. I am able to get data back with
a
similar 3rd party .Net Provider from the same Database, however, I would
prefer to use the one from Microsoft.
- Follow-Ups:
- Re: .Net Provider for DB2 in HIS 2006
- From: Ken Kwok [MS]
- Re: .Net Provider for DB2 in HIS 2006
- References:
- Re: .Net Provider for DB2 in HIS 2006
- From: Ken Kwok [MS]
- Re: .Net Provider for DB2 in HIS 2006
- Prev by Date: Re: Time intelligence - still failing at the lowest level
- Next by Date: MDX query mapped to a pivot table
- Previous by thread: Re: .Net Provider for DB2 in HIS 2006
- Next by thread: Re: .Net Provider for DB2 in HIS 2006
- Index(es):
Relevant Pages
|