Announcement

Collapse

Maintenance

The forum could be offline for 30-60 minutes in the very near future for maintenance (said 3pm Pacific). I was behind on getting this notice. I do apologize.
See more
See less

HELP ! SQL / ODBC

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • HELP ! SQL / ODBC

    I have been recently employed as the IT manager for a UK company.
    The are running powerbasic application on DOS, and require
    a data warehouse / reporting applicaiton to be built. I am
    looking for tools to assist with ODBC / SQL extract, so I may
    built a set of HTML / XML reports.

    Can you please point me in the right direction.

    The developers that were involved with the building of this
    organic applicaiton has since left the company and I have
    been appointed the task of building a central reporting / data
    warehouse solution so all 25 branches are reporting on a central
    platform


    ------------------

  • #2
    Well, I think your first tool is to think Windows.

    I seriously doubt there's anything available for MS-DOS to execute SQL statements against a database. (And if your database is proprietary-format, your challenge is even greater).

    Once you get to Windows, you have many options.

    Since you can SHELL a Windows' app from MS-DOS, you may be able to find a (Windows) command-line tool which can accept either command-line or file input and return file output; and you can then read the file back in your MS-DOS program.

    Of course, you can ("in theory") write your own SQL parser and access your application's database that way.



    Michael Mattias
    Tal Systems Inc. (retired)
    Racine WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      Michelle--

      Please do not post the same question/comment in multiple forums. Thanks!

      Bob Zale
      PowerBASIC Inc.


      ------------------

      Comment


      • #4
        Take a look at this link: http://www.itshareware.com/prodview-...odbc-4-all.htm

        ------------------

        Comment


        • #5
          Here is an example that I have done with ODBS4ALL & PB32. It seems to work
          with simple SQL statements. I haven't tried everything else yet but it has been fun
          to experiment.

          $link "c:\pbu3\sql.pbu"
          declare sub sql(string,string)

          dsn$="okla203dbf" 'Data Server Name from odbc config in Control Panel

          'sql1$="select * from okla203 where interest > 0"
          'sql1$="select * from okla203 where chkmark = "+chr$(34)+"*"+chr$(34)

          sql1$="select * from okla203 where deposit > 0"

          sql dsn$,sql1$

          end

          '*********************************************************************
          $compile unit

          sub sql(dsn$,sql1$) public

          open "c:\sqlcmd\outfile.ini" for output as #100

          print#100,"[ODBC]"
          print#100,"DSN="+dsn$
          print#100,"User="
          print#100,"Password="
          print#100,"SQL="+sql1$ 'select * from okla203 where interest > 0
          print#100,"[Output]"
          print#100,"Type=dbf"
          print#100,"FileOut=c:\SqlCmd\outfile.dbf"
          print#100,"FileErr=c:\SqlCmd\MyConfig.err"
          close 100
          shell"c:\progra~1\odbc4all\odbc4all.exe c:\sqlcmd\outfile.ini"
          end sub


          ------------------
          djthain
          djthain

          Comment


          • #6
            That ODBC-4-All is a pretty clever idea.

            I think I shall copy its design, except maybe put it a DLL so I can plug it into any Windows program.

            Michael Mattias
            Tal Systems Inc. (retired)
            Racine WI USA
            [email protected]
            http://www.talsystems.com

            Comment

            Working...
            X