Interesting project using migrating AS400

  • Thread starter Thread starter guyinkalamazoo3
  • Start date Start date
G

guyinkalamazoo3

Guest
I have a current bigger project where we are needing to migrate a large AS400 database system into SQL. I was going to use SSIS but it has run into some issues, so I am building out a VB .Net program to do this (also managers would like a UI tool to visualize some data). And no, we do not want a third-party tool to do this.

I have searched for this and I dont know if someone might know here, but I want to query AS400 table names. What I am trying to do is dynamically create the table in the SQL server instance if it does not already exist from the AS400. I need to get that table name syntax and then columns from the AS400 - basically the schema.

The connection in .Net is my installed ODBC iSeries AS400 connection and it seems to be working in .Net. I tried using this to build the string:

Dim as400Qry As String = "select name from FCSOLIBD.SYSTABLES where TABLE_NAME = " & txtAS400Table.Text
Dim comm As New OdbcCommand(as400Qry, conn)
conn.Open()

But I get this error when running it

System.Data.Odbc.OdbcException
HResult=0x80131937
Message=ERROR [42S02] [IBM][System i Access ODBC Driver][DB2 for i5/OS]SQL0204 - SYSTABLES in FCSOLIBD type *FILE not found.
Source=CWBODBC.DLL
This exception was originally thrown at this call stack:
[External Code]
Keane_Conversion.Form1.Button1_Click(Object, System.EventArgs) in Form1.vb
[External Code]

I am taking a stab in this forum to see if anyone might be able to direct me in what I need to do. Thanks





Brad Allison

Continue reading...
 

Similar threads

Back
Top