Loading ...
Sorry, an error occurred while loading the content.

RE: [Clip] A newbie speaks....

Expand Messages
  • Grant Mackenzie
    ... Hi Although the clip methods for dealing with delimited txt files are great (^$GetField(number:row)$ etc as Jody mentioned) notetab has no native way of
    Message 1 of 9 , Apr 3, 2002
    • 0 Attachment
      > The functionality I would LOVE to add is the ability for NoteTAB to be
      > able to take this Part Number and use it to query an ODBC database. Now
      > as NoteTAB IS used to do Web Design. I am QUITE SURE there MUST be some
      > sort of subroutine to do this. It's just I'm not SAVVY enough with this
      > stuff to do it.

      Hi
      Although the clip methods for dealing with delimited txt files are great
      (^$GetField(number:row)$ etc as Jody mentioned) notetab has no native way
      of accessing databases.
      However I do work with databases and have found notetab indespensible in
      writing script to automate data manipulation and access routines.
      Ms data access components can be found at.
      http://www.microsoft.com/data/
      Download the latest mdac release. now 2.7
      To access database data I use the ADO com object instantiated in the Window
      Script Host
      COM objects are language nuetral so you can use your favourite language to
      instantiate theADO object and use it's properties and methods.
      The active PERL disttribution last time I looked had some example ADO and
      WSH examples.

      Since script is run in the console and has no gui
      I use notetabs getout method to both run and get the output from the script
      host
      ^$getoutput()$
      and I also pass arguments to the script using the same method.
      The argument in your case would be the Part Number

      ;the location of script to run
      ^!Set %file%="^$GetScriptPath$ado.js"
      ;get rid of logo
      ^!Set %hostOptions%=^$StrFill(/;2)$nologo
      ^!Set %arg%="Part Number"
      ^!INFO ^$GetOutput(Wscript "^%file%" "^%hostOptions%" ^%arg%)$

      The actual ado script would go something like this.
      Instantiate ADO object
      Connect to database use dns-less connection string
      Contruct SQL string
      Execute the SQL statement
      Close connection

      And would be written in whatever scripting language you pefer.
    Your message has been successfully submitted and would be delivered to recipients shortly.