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

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

Expand Messages
  • Jody
    Hi Robert, ... ^$GetField(number:row)$ I think. ... I don t do ODBC, so I cannot help you further. Import file you edited in NoteTab to ODBC?
    Message 1 of 9 , Apr 2, 2002
    • 0 Attachment
      Hi Robert,

      >In the ASCII files I mentioned are PART NUMBERS for the various
      >components used in the schematics that the engineers create. I
      >use NoteTAB to sniff out these part numbers from the ASCII files.

      ^$GetField(number:row)$ I think. <g>

      >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.

      I don't do ODBC, so I cannot help you further. Import file you
      edited in NoteTab to ODBC? ^$GetField(number:row)$ and then Find
      in ODBC file?

      ^!Set %row%=1
      ^!SetDelimiter ^%tab%

      :Loop
      ^!Set %pn%=^$GetField(number:^%row%)$
      ^!Document Next
      ^!Find "ODBC file" Grin
      ^!IfError End
      ^!InsertText ^%pn%
      ^!Inc %row%
      ^!Document Prev
      ^!Goto Loop

      Also, check out:

      ^$GetDocIndex$
      ^!SetDocIndex
      ^$GetFileText(...)$
      ^!SetListDelimiter
      ^!Save As (path\filename - makes/overwrites without prompt)
      File | Export

      Help | Help on Clip Programming

      Happy Clip'n!
      Jody

      http://www.notetab.net

      Subscribe, UnSubscribe, Options
      mailto:Ntb-Clips-Subscribe@yahoogroups.com
      mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
      http://groups.yahoo.com/group/ntb-clips
    • 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 2 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.