Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

VB.net Connection To AS/400

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • VB.net Connection To AS/400

    OK. I'm new to writting a web app in VB.net. I always used ASNA before. So here is my question. I just want to prove a point that this can be done. I can get the connection to connect to the 400 with an SQL string. I don't know what to do with it to show the data. I know this is an easy thing to do but I'm not a VB.net person. I just need something to show the data for now. Any help would be great. Examples of reading through the data or just displaying for now would be graet. Thanks Here is my code so far: Imports IBM.Data.DB2 Protected Sub Button1_Click1(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim iConn As New IBM.Data.DB2.iSeries.iDB2Connection() iConn.ConnectionString = "Data Source=##.##.##.##;Default Collection=[MyTable];" Dim iCmd As New IBM.Data.DB2.iSeries.iDB2Command("SELECT * FROM Library.MyFile") iCmd.Connection = iConn Dim iDA As New IBM.Data.DB2.iSeries.iDB2DataAdapter(iCmd) Dim lds As New Data.DataSet() Try iConn.Open() btnhello.Text = "YES" iDA.Fill(lds, "not sure if i need the field name or not") WHAT CAN I DO HERE TO SHOW THE DATA? Catch ex As IBM.Data.DB2.iSeries.iDB2Exception btnhello.Text = "ERROR" Finally iConn.Close() End Try End Sub
Working...
X