DB2 and VB connections

databases Ireland
  • 19 years ago

    Hello
    Thanks a million - In advance!!!!
    I require to be able to export and import from a DB2 database to an .IXF file.0


    I am not sure what information you require, but the spec is this


    VB to connect to an MIS database (DB2) and export a series of data in fields to a number of files. these files will be of extension .ixf.the databgase hold information like customer name, address etc.
    assumed that the following code would work, but alas does not


    Set objEnvironment = rdoEngine.rdoEnvironments(0)
       objEnvironment.CursorDriver = rdUseOdbc
       Set objConnection = objEnvironment.OpenConnection("", , , "ODBCATABASE=MIS;UID=MIS;PWD=MISUSER;DSN=mis")


       sbStatusBar.SimpleText = "Connecting to MIS..."


    'strSQL = "import from c:templookup of ixf insert into newmis.lookup"
    'strSQL = "export to cutstanding of del select * from newmis.lookup where lookupstatus = 'O'"
    'strSQL = "export to d:exp
    lkup.ixf of ixf messages d:exp_lkup.msg SELECT * FROM MIS.LOOKUP"
    'strSQL = "EXPORT TO c:\calls.ixf OF IXF MESSAGES c:\calls.ixf SELECT * FROM MIS.LOOKUP"


       strQueryNumber = intQueryNumber + 1



       strsql = "Select * from newmis.lookup where lookup_status = 'O'"


    However, when read through a command prompt, I can connect,. so the probelm lies with the VB program, Thanks and i hope that this is enough information that you require.


    Cheers,


    Maggiethemag!!!


Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“XML is like violence - if it's not working for you, you're not using enough of it.”