Finding database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sophie18
    New Member
    • Mar 2008
    • 4

    Finding database

    hi there. i'm developing a project with database but i'm new at this and i've got some problems with the code. It appears to me the error 'Can't find ..ISAM!'. can u help me? thanks
  • VBWheaties
    New Member
    • Feb 2008
    • 145

    #2
    Originally posted by Sophie18
    hi there. i'm developing a project with database but i'm new at this and i've got some problems with the code. It appears to me the error 'Can't find ..ISAM!'. can u help me? thanks
    Post your code. Installable ISAM error can be related to a few things.

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      Just so you know Sophie, this error probably has nothing to do with finding the database. It's generally about not being able to find the correct installed driver software for a particular type of database.

      Comment

      • Sophie18
        New Member
        • Mar 2008
        • 4

        #4
        Originally posted by Killer42
        Just so you know Sophie, this error probably has nothing to do with finding the database. It's generally about not being able to find the correct installed driver software for a particular type of database.



        So can u help me writing the right code so it can find the folder where the database is?

        Comment

        • Killer42
          Recognized Expert Expert
          • Oct 2006
          • 8429

          #5
          Originally posted by Sophie18
          So can u help me writing the right code so it can find the folder where the database is?
          Can you show us what you're doing now? As I said, I don't think that error has anything to do with locating the database.

          You need to be more specific about what you need the code to do. For instance, does it need to go searching through all the drives at runtime, trying to track down a database with a specific name? If so, this seems a rather inefficient and error-prone way to handle things.

          Comment

          • Sophie18
            New Member
            • Mar 2008
            • 4

            #6
            Yes, I need a code that will search through the drives and the database with the specific name.. i know that's something like 'Appth...' but it gives me an error all the time..

            Comment

            • lotus18
              Contributor
              • Nov 2007
              • 865

              #7
              Originally posted by Sophie18
              Yes, I need a code that will search through the drives and the database with the specific name.. i know that's something like 'Appth...' but it gives me an error all the time..
              I think it is App.Path. As just like what Killer42 said, post some of you codes here for reference. A simple Common File Dialog will solve this problem.

              Rey Sean

              Comment

              • Killer42
                Recognized Expert Expert
                • Oct 2006
                • 8429

                #8
                If you want to scan through all the directories on a drive to find a file with a particular name, then the technical details will depend on what version of VB you're using.

                In the latest version, for instance, I gather you can use this...[CODE=vbnet]string[] filenames = System.IO.Direc tory.GetFiles(" path","search pattern", System.IO.Searc hOption.AllDire ctories)[/CODE]to generate an array of the file names. However, I think this doesn't tell you where the files are, just their names. Try the search box, you should find plenty of info from prior questions about this topic. In fact, have a look at this thread from a couple of days ago. I think you'll find the short answer in post #14, but it might be a good idea to read through the thread to get an idea of what's going on.

                In VB6, you'd probably need to write a routine which would scan a directory (preferably using FileSystemObjec t). For each file it finds, it would do whatever you want. For each directory it finds, it would call itself recursively to scan that directory.

                I plan to post a generic VB6 routine in the HowTo's section fairly soon which will scan the directory structure like this, but it's not there yet.
                Last edited by Killer42; Mar 28 '08, 01:38 AM. Reason: Fixed a comma that had been entered as "m"

                Comment

                • Sophie18
                  New Member
                  • Mar 2008
                  • 4

                  #9
                  I'm using VB6.

                  This is the code: App.Path = "BaseDados_PAT. dmb"
                  now it doesn't give me tge error but it doesn't appear anything in the datafields.

                  Comment

                  • lotus18
                    Contributor
                    • Nov 2007
                    • 865

                    #10
                    Originally posted by Sophie18
                    I'm using VB6.

                    This is the code: App.Path = "BaseDados_PAT. dmb"
                    now it doesn't give me tge error but it doesn't appear anything in the datafields.
                    If you are using access, change it to

                    [CODE=vb]App.Path = "BaseDados_PAT. mdb"[/CODE]

                    Rey Sean

                    Comment

                    • VBWheaties
                      New Member
                      • Feb 2008
                      • 145

                      #11
                      Originally posted by Sophie18
                      I'm using VB6.

                      This is the code: App.Path = "BaseDados_PAT. dmb"
                      now it doesn't give me tge error but it doesn't appear anything in the datafields.
                      "BaseDados_PAT. dmb" is not a path. Did you mean "mdb"?
                      MDB is an Access database file. I dont think dmb is anything database related.

                      Your biggest problem is communicating the issue. There is no source code posted as was asked, and the one line of code (app.path) will not generate the error described above.

                      I know you think were good but were not THAT good. Post up your code. :)

                      Comment

                      Working...