Anyone have any practical experience with an AS400 dataprovider that works.


Anyone have any practical experience with an AS400 dataprovider that...
Author
Message
Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
Awesome, you guys are the best.

Keith Chisarik
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
If all you want do to is create a read only DB2 item, then it will actually be quite easy.  You will probably have it done before the day is out.  You'll still want to copy over the SqlDataSourceItem and modify it, but you can take the methods like UpdateRow(), and CreateInsertCommand(), etc. and just throw a NotSupportedException from within them.  Then, all you need to do is modify the CreateSelectCommand() method to match what the AS400 is expecting.  As far as I can tell, the only thing that needs to be modified up front is to remove the TOP keyword and make it a LIMIT at the end of the command (you'll see where it is when you look at the code).  The other methods that need to be changed are one-liners... like CreateBlankDbCommand()... it just returns a new OleDbCommand object, or whatever provider you're using.
Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
Write AS400DataSourceItem, check.



Tell me how realistic this is to save some up-front work. Initially all we need to do for phase one is export, read, and report data. Could I just convert/modify the SELECT type methods from the AccessDataSourceItem template to create a sort of read-only DbDataSourceItem. All I really want to do do is populate a BO, not update it (yet).



Then later I could layer on the more complicated (I'm sure) INSERT, UPDATE, and concurrency methods?



What do you think? Is that viable at all?



Thanks.

Keith Chisarik
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
I would use either the OleDb* objects or some other ADO.NET provider, like the one from DataDirect (http://www.datadirect.com/products/net/index.ssp).  Once you have the provider chosen, you will need to create your own DbDataSourceItem, like SqlDataSourceItem.  Your best bet is going to be to copy and modify the SqlDataSourceItem class's code file to create your own DbDataSourceItem for DB2.  The DbDataSourceItem class creates all of the actual SQL commands from the QueryInfo objects that are supplied by the DataLayer within the business objects.  It will take some work, and you will probably want to setup some unit tests to make sure it's all working, but you can use most of what is in the SqlDataSourceItem, because the two are very similar.  You can also cut out pieces of the implementation, for example, if you don't want to be able to support stored procedures.  The AccessDataSourceItem class uses OleDb* objects, but does not support stored procedures, so it is much smaller than the SqlDataSourceItem or OracleDataSourceItem.
Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
I have a prototype working for my AS400 data access project, I now want to convert the project to use Strataframe.



How do I take what I have to create the connection....



Dim oConn As OleDb.OleDbConnection

oConn = New OleDb.OleDbConnection("Provider=IBMDA400; Data Source=192.168.42.100; User ID=xxxxxxx; Password=yyyyyyy;")

oConn.Open()



and make it into something like this the framework requires...

'-- Visual Fox Pro

'DataLayer.DataSources.Add(New VfpDataSourceItem("", "myconnectionstring"))



as I dont see a datasource item for OLE.



I realize I cant use the ConnectionManager with OLE.



Thanks.

Keith Chisarik
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Actually, most of the benefits of the .NET providers written specifically for a database are not used by StrataFrame itself... we have to rely on what's available in the classes in the System.Data.Common namespace to keep SF provider independent.  However, you will get better performance finding a DB2 provider instead of using OLEDB.  I'm pretty sure DataDirect has a good DB2 provider, as does IBM itself.
Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
*wishes for self edit privs again*



Also, the best lead I have would implement an OLEDB solution, I think you guys told me that would work fine with Strataframe, and that I would just lose some of the strong typing benefits and other benefits of a provider written specifically for the data source?

Keith Chisarik
Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
Our biggest customer uses an AS400 as their database. The very limited programming I have done for them was years ago using Perl and ODBC. Most of the work we do for them currenty is done in RPG but they are now asking for stuff that is better suited to .NET, specifically ASP.NET, for their customers to view inventory on the web.



I have been looking and have some leads but if someone here has some practical expreience with something that works ( a data provider), I would sure appreciate it.

Keith Chisarik
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search