Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. AS400

AS400

Scheduled Pinned Locked Moved Visual Basic
helpdatabasesysadmintutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    Dear ppl... Im an intern and recently my boss ask mi to work on a vb project... This is my first time using AS400 wit Vb and i have no idea wat to do.... I did manage to setup e ODBC(took mi a day to understand) and managed to retrieve e data from e AS400 server and its now in access format... But can any1 enlighten mi or show mi sample codes as to how to retrieve e data from AS400 and display it in vb? My main problem is wit e connection strings and i have no idea wat i need to type in... Dim strConn As String, strSQL As String Set cnn = New ADODB.Connection Set rst = New ADODB.Recordset cdgDataBase.ShowOpen strConn = "User Id=Dian; Data Source=AS400_Test; DATABASE=SISTFL12T; Password=dian9" & cdgDataBase.FileName strSQL = "select * from SIBRND" With cnn .Provider = "Microsoft.Jet.OLEDB.4.0" .ConnectionString = strConn .Open The above is wat i did so far but dun think its e right codes... Can any 1 help mi out thank u bery bery much! :sigh:

    D 1 Reply Last reply
    0
    • A Anonymous

      Dear ppl... Im an intern and recently my boss ask mi to work on a vb project... This is my first time using AS400 wit Vb and i have no idea wat to do.... I did manage to setup e ODBC(took mi a day to understand) and managed to retrieve e data from e AS400 server and its now in access format... But can any1 enlighten mi or show mi sample codes as to how to retrieve e data from AS400 and display it in vb? My main problem is wit e connection strings and i have no idea wat i need to type in... Dim strConn As String, strSQL As String Set cnn = New ADODB.Connection Set rst = New ADODB.Recordset cdgDataBase.ShowOpen strConn = "User Id=Dian; Data Source=AS400_Test; DATABASE=SISTFL12T; Password=dian9" & cdgDataBase.FileName strSQL = "select * from SIBRND" With cnn .Provider = "Microsoft.Jet.OLEDB.4.0" .ConnectionString = strConn .Open The above is wat i did so far but dun think its e right codes... Can any 1 help mi out thank u bery bery much! :sigh:

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      You first problem is your using the wrong Provider. The 'Microsoft.Jet.OLEDB.4.0' provider is for Microsoft Access databases only. Your going to need a Provider that works with AS400. You can find one at www.hit.com. RageInTheMachine9532

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups