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


Anyone have any practical experience with an AS400 dataprovider that...
Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Well, I don't think that your provider is correct.  I will have to investigate what the provider would be for this type of connection source, but an example is this:

Visual FoxPro = VFPOLEDB.1 OR VFPOLEDB

Microsoft Jet 4.0 OLE DB Provider = Microsoft.Jet.OLEDB.4.0

Notice that the provider will not accept spaces.  It is looking for the COM class name in most cases.

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
they did 15 minute ago Blink



Anyhow I used DbProviderFactories.GetFactoryClasses() to make sure I had the right registered name. It is registered as "DataDirect DB2 Data Provider", which I tried with no luck, same error.



Here are the images again. Thanks.




Keith Chisarik
Attachments
error1.jpg (167 views, 106.00 KB)
error2.jpg (162 views, 40.00 KB)
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Just post the images as attachments.  I don't know why they aren't showing up.
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
not sure why the first image doesnt show, here it is again.





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
Finding it tough to give up considering I am finding that the speed of the DataDirect provider is easily 20x the OLE one.



Here are some more details of the errors I am getting trying to use the DataDirect provider in the BO Mapper.



I called their support and they confirmed that the DB2 provider is correctly registered in the GAC and the machine.config, which I tend to believe since everything works using the native .NET tools. Perhaps I am doing something wrong that the shots will illustrate.



DataDirect says they are more than willing to do anything to help, including talk to you guys.














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
No problem.  We've got an inside contact at IBM that might be able to hook us up... if not, I believe they have a "personal" version of DB2 that you can install for free.
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
Thanks Ben, I am going to move ahead with my current need without Strataframe as I have a tight timetable but being able to use SF with our AS400 clients is srill very important to us. I appreciate you looking into it. If you need anything from me to help you, please let me know.

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 think we're going to have to get a DB2 server setup around here to figure this one out.  Basically, the BOMapper uses the GetSchema() method of the OleDbConnection object to enumerate the "databases" and "tables" but appearantly, the collections are different when getting the schema.  It's going to take some testing, but I'll keep you posted.
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 things cooking in "raw ADO" using the DataDirect provider as well. Since I can access data from my AS400 using both OLE and ADO now, I guess I just need help making these work with SF.

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
Next question....



I got the initial work done so at least it doesnt blow up on me using:

DataLayer.DataSources.Add(New AS400DataSourceItem("", "Provider=IBMDA400; Data Source=192.168.42.xxx; User ID=xxx; Password=xxx;"))



I didnt actually change much in the custom datasource item, I figured once I mapped it I could debug.



My problem is this, I dont seem to be able to use the BO Mapper. I have the project set to use the OLE DB connection string and it connects, but the mapper only shows SQL Server, then the IP address of the server in the treeview when I hit "Specify Data Source", no tables. The AS400 uses libraries, then files instead of databases and tables, this may be the issue.



This is the code that works not using Strataframe if that helps any. It is just a simple "proof of concept" that loads a single field into a grid.



Being able to use Strataframe with our AS400 client base is huge for us, I appreciate the ongoing help.



Try

Dim sqlstring As String

sqlstring = "SELECT CSANCS FROM FRUITF.PLT"

'setup our connection to the database

Dim oConn As OleDb.OleDbConnection



oConn = New OleDb.OleDbConnection("Provider=IBMDA400; Data Source=192.168.42.xxx; User ID=xxx; Password=xxx;")

oConn.Open()



'setup the data adapter

Dim myDataAdapter As OleDb.OleDbDataAdapter



myDataAdapter = New OleDb.OleDbDataAdapter()



myDataAdapter.SelectCommand = New OleDb.OleDbCommand(sqlstring, oConn)



Dim myData As DataSet

myData = New DataSet()



myDataAdapter.Fill(myData, "PLT")



Dim dt As DataTable

dt = myData.Tables("PLT")



Me.BindingSource1.DataSource = dt

''binding the table to datagrid

Me.DataGridView1.DataSource = Me.BindingSource1

Me.DataGridView1.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCellsExceptHeader)

Me.DataGridView1.Refresh()



'close the connection

oConn.Close()



Catch ex As Exception

MsgBox(ex.ToString)

End Try

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