AS400
-
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:
-
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:
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