CAN CONNECT TO IBM AS/400 WITH WINDOWS FORMS BUT,
NO SUCCESS WITH WEB FORMS. ANY HELP FROM ANYONE WITH ANY
KIND OF .NET EXRERIENCE WITH THE IBM AS/400 IS WELCOMED!
I've used ODBC with a DSN on Web Forms. I never could get OLE DB to work right, even in Win Forms. There is also a new provider, I believe its a beta, that IBM has released. Search their website for the .Net provider for iSeries.
Drag an odbcDataAdapter from the Toolbox onto the form and specify the existing connection to the /400 under "Data Connections" in the Server Explorer.
This technique (and everything else I tried) fails in a WEB FORM.
I need explicit (gorier the better) details for any technique which actually works in Windows Forms.
Maybe there is a bug that I'm not noticing. I believe I declared my connection in code. You might want to try that.
Code:
Dim myCon As New System.Data.ODBC.OdbConnection
myCon.ConnectionString="DSN=myDSN"
myCon.Open()
I can't remember right off hand if I got the namespace right, but it's not hard to find, if you have a reference set to it. You could PROBABLY also use a DSN-less connection string as well.
After installing IBM personal Db2 on the machine I was successful in connecting oledb with a regular connection string. I am aware, however, that installing this may not be an option for you.
GetConnectionString = "Provider=IBMDADB2.1;Data Source=" & SERVER & ";User ID=" & USER_NAME & ";Password=" & PASSWORD
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.