Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IBM AS/400 CONNECTIONS

Status
Not open for further replies.

ben6711

Programmer
Feb 11, 2004
5
0
0
US
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.
 
Successful Windows Form Technique:

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top