Re: .Net Provider for DB2 in HIS 2006

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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.



.



Relevant Pages

  • Re: SQL Express 2005 doesnt support multiple users....
    ... > database should specify the same connection. ... With user instances, you are ... > Express) and set both client connection strings to ... > Jasper Smith (SQL Server MVP) ...
    (microsoft.public.sqlserver.connect)
  • Re: Connection string / design question
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... I have a question regarding the handling of connection strings. ... application - windows forms apps, web apps, web services and windows ... them connect to the same database. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Security problem after reboot
    ... "John D. Gwinner" wrote in message ... The error is actually *correct* the TS user should NOT have access to the database. ... I removed all of the connection strings in the /ts app. ... If you can't remove the root level web.config, you can disable inheritence using allowOverride: http://msdn.microsoft.com/en-us/library/ms178685.aspx#restricting_asp_net_inheritance or InheritInChildApplications: ...
    (microsoft.public.windows.terminal_services)
  • Re: Security problem after reboot
    ... The error is actually *correct* the TS user should NOT have access to the database. ... I removed all of the connection strings in the /ts app. ... However, under "Providers" there are two providers, AspNetSqlRoleProvider and AspNetWindowsTokenRoleProvider, both of which are 'inherited'. ...
    (microsoft.public.windows.terminal_services)