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
Finding database
Collapse
X
-
Originally posted by Sophie18hi 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 -
Originally posted by Killer42Just 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
-
Originally posted by Sophie18So can u help me writing the right code so it can find the folder where the database is?
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
-
Originally posted by Sophie18Yes, 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..
Rey SeanComment
-
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.Comment
-
Originally posted by Sophie18I'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.
[CODE=vb]App.Path = "BaseDados_PAT. mdb"[/CODE]
Rey SeanComment
-
Originally posted by Sophie18I'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.
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
Comment