DB2 Provider - updates/CRUD


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
I finally got connected to our AS400 using DB2Connect software from IBM, not sure why I need another product to do this but according to IBM I do, and our IBM guy says that isnt a stranger model for them to have. Oh well, moving on.



I am able to use the BO Mapper against my AS400 OS400 DB2 databases,libraries, and tables, map to business objects and use the "read only" type controls like bound textboxes, the SF Maintenance form, ListView, and BrowseDialog, a hug improvement from 2 weeks ago Smile



Now I need to figure out what to set up for updates and CRUD settings, when I try to "save" it blows out saying there is no primekey on the table (which there is). I imaging is is because I have always relied on the DDT to create sprocs for CRUD, and I cant with the DB2 model.



So, where do I go from here? Do I need to create sprocs on the 400 for these? Our in-house 400 guy is an RPM programmer and has never used stored procedures. I nudge along the right direction will be much appreciated.



Licensing for the DB2Connect product is about $500.00 for a sinlge user, or $2,500.00 for 25 named users, if anyone was curious.



Thanks,



Keith

Keith Chisarik
Replies
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 this problem. Any idea where I can set the property IBM refers to as the fix? I think the connection object is encapsulated in your DB2 provider, yes?



My customer does not want to turn on journaling.



http://www-1.ibm.com/support/docview.wss?uid=swg21206832

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
You can accomplish this by subclassing the Db2DataSourceItem class and overriding the CreateBlankDbConnection() method.  This is the current code, so just modify it to turn off journaling on the connection before you return it:

        Public Overrides Function CreateBlankDbConnection() As System.Data.Common.DbConnection
            Dim conn As DbConnection = Me._Factory.CreateConnection()
            conn.ConnectionString = Me.ConnectionString
            Return conn
        End Function

The _Factory is, of course private, but you can either override the constructor and store it off yourself, or just create a new DB2Connection object, since you know what provider you're using Smile

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
Or, of course, call MyBase.CreateBlankDbConnection() and just modify the property on the return value before you return it Wink
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