Topic
  • 1 reply
  • Latest Post - ‏2012-01-17T02:38:19Z by SystemAdmin
Saruton
Saruton
1 Post

Pinned topic DB2 Load command via ADMIN_CMD doesn't work from VB.NET application

‏2012-01-05T02:43:06Z |
Hi ALL,
VB.NET application tries to load CSV file into DB2 using SYSPROC.ADMIN_CMD, but any records are not loaded without any exceptions.

Dim sSQL As String = "CALL SYSPROC.ADMIN_CMD('LOAD FROM "D:\test\datafile" OF DEL INSERT INTO MYSCHEMA.MYTABLE')"

Dim myCmd As DB2Command = aConnection.CreateCommand()
Dim myTrans As DB2Transaction =aConnection.BeginTransaction()
myCmd.Transaction = myTrans
myCmd.CommandText=New String(sSQL)
myCmd.ExecuteNonQuery()
myCmd.TransactionCommint()

Codes shown above are something wrong?
How can I get diagnosis information?

Thanks,
Updated on 2012-01-17T02:38:19Z at 2012-01-17T02:38:19Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1731 Posts

    Re: DB2 Load command via ADMIN_CMD doesn't work from VB.NET application

    ‏2012-01-17T02:38:19Z  
    i would try to call the admin_cmd procedure without parameters and see if i get an error
    this way you can check if it was called at all