Announcement

Collapse
No announcement yet.

Whats the correct path for a dbf file for %DB(OPEN|Handle|Filename)%?

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

    Whats the correct path for a dbf file for %DB(OPEN|Handle|Filename)%?

    With some help from around here, I've discover the OUI tokens and how to use the properly, which would seem to open up a great deal of options. The database access functions seem like they could be very useful, but the expected path for the things is unclear. Anyone know where OUI looks for those files?
    Roger Romer
    http://www.vixenhill.com

    #2
    Re: Whats the correct path for a dbf file for %DB(OPEN|Handle|Filename)%?

    Depends on your hosts file structure.

    The database root path should be /miva/Merchant2, /miva/mivadata/Merchant2, /htsdata/Merchant2

    Or something similar.

    Do not confuse your data structure with the script structure, which is /www/Merchant2.

    Comment


      #3
      Re: Whats the correct path for a dbf file for %DB(OPEN|Handle|Filename)%?

      I'm not sure what specific path that function is looking for but the path can vary depending on the host, most of the time the path to your store data files is /mivadata/Merchant2/00000001/ . The /mivadata/ folder can be called other things with different hosts and 0000001 is whatever store your using.. malls can have 00000002.. 0000003 etc.

      You may need to experiement a little, the docs don't specify what value the filename is looking for.

      http://www.openui.org/docs/pdf/OPEN_TOKENS.pdf

      Gary Hodder
      Support
      --
      CybrHost Corp. - http://www.cybrhost.com/ - [email protected]
      +1-866-300-MIVA - Professional Miva & E-Commerce web hosting services.
      Premiere Hosting Partner Since 1999

      Comment


        #4
        Re: Whats the correct path for a dbf file for %DB(OPEN|Handle|Filename)%?

        Thanks. Looks like it expected it in the \mivadata path. Thanks a bunch guys!
        Roger Romer
        http://www.vixenhill.com

        Comment


          #5
          Re: Whats the correct path for a dbf file for %DB(OPEN|Handle|Filename)%?

          The docs do not specify because you could be opening any Merchant database. Since the databases are structured according to module type, as well as each vendor, the path could indeed be 2-3 levels deeper than the module root.

          Unless specified differently, DBOPEN starts from the module root.

          Typically, you define your path ahead of time in a local variable, such as:
          Code:
          <MvASSIGN NAME = "l.directory" VALUE = "{ g.MerchantPath $ padl( Stores.d.id, 8, '0' ) $ '/module/' }">
          Where vendor is the module's specific folder.

          Then open it with:
          Code:
          <MvOPEN NAME = "DBAlias" DATABASE = "{ l.directory $ database.dbf' }">
          In OpenTokens, this would be
          Code:
          %ASSIGN(l.directory|"{g.MerchantPath $ padl(Stores.d.id,8,'0') $ '/module/' }")%
          %DB(OPEN|DBAlias|"{ l.directory $ database.dbf' }")%
          This is just an example, but should get you started.

          Comment


            #6
            Re: Whats the correct path for a dbf file for %DB(OPEN|Handle|Filename)%?

            Thanks again. Useful info. I'm intending to use my own db though, but you never know when that kind of information can come in handy.
            Roger Romer
            http://www.vixenhill.com

            Comment


              #7
              Re: Whats the correct path for a dbf file for %DB(OPEN|Handle|Filename)%?

              If you are planning on creating your own DB, then you really want to keep the directory structure in mind. I would stronly suggest you create the database its own subfolder.

              Originally posted by Phatose
              Thanks again. Useful info. I'm intending to use my own db though, but you never know when that kind of information can come in handy.

              Comment

              Working...
              X