Source language: Translate to:

Opening different MDB files

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Opening different MDB files

Postby BRobinsonS » Fri Aug 24, 2012 5:25 pm

I have an app that I would like to open MDB files in different folders only one at a time.

Example: Two different MDB files can have the same tables.
One folder contains Records from Year2011, another folder contains Records from Year2012.

Or could be two different MDB files with different tables.

I would like to have ONE program which can open the files in a form or grid.

I have tried FileOpenBox, FolderBox, used global variable [CurrentDir]
Extractfilename, ExtractFilePath.

Search on the Forum looking for ideas.

Can't seem to get it working.
So I turn to the knowledgeable.
Brian Robinson
'When all else fails, try again!'
www.ComputerSoftwareSystems.com
User avatar
BRobinsonS
 
Posts: 337
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada

Postby Gaev » Fri Aug 24, 2012 7:28 pm

Brian:

Files with the extension of .mdb are Microsoft's Access databases ... so they are not plain text files ... hence you need to use dbpOpenAccessDatabase (and then dbpOpenTable) to read/write the records within the Tables.

If you want to allow a user to choose one of these, then the FileOpenBox can be used to prompt for it ... the File Mask can be used to limit his/her choices to *.mdb files ... the Initial Path can be set to (perhaps) the parent folder of the different folders involved.
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby BRobinsonS » Sat Aug 25, 2012 7:00 am

Sorry I guess I should have said I can open mdb ok, but I wanted to open different MDB in different directories with the same program.

I forgot about the DBViewer sample program. It seems to do what I want to do.
I did notice that a couple of the MDB files didn't show tables perhaps I didn't establish a primary key/index for the table inside the MDB.

I'll have to study the DBViewer sample to see what I didn't understand.
Brian Robinson
'When all else fails, try again!'
www.ComputerSoftwareSystems.com
User avatar
BRobinsonS
 
Posts: 337
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada

Postby Gaev » Sat Aug 25, 2012 10:57 am

Brian:
I did notice that a couple of the MDB files didn't show tables perhaps I didn't establish a primary key/index for the table inside the MDB.
I don't think it is for that reason.

Perhaps the dbpOpenAccessDatabase failed (needs password ?) ... so trying to a dbpOpenTable on an unopened DB would give you "nothing".

Or it is not a true .mdb file ... e.g. renaming a .jpg to .txt will not mean that notepad.exe can display its contents ... what are the sources of these .mdb files? ... i.e. which organization created/populated them in the first place ?
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby BRobinsonS » Sat Aug 25, 2012 1:54 pm

(needs password ?)
Not using password
what are the sources of these .mdb files?

All MDB files created with NeobookDBpro.

I found there might be a small flaw with the demo pub.
Table(s) don't always show if I open to different copies i.e. AddrBook.mdb in two different directories. If I open a different name i.e. Another.mdb and then go back to the one which didn't show table(s), it displays correctly.
Brian Robinson
'When all else fails, try again!'
www.ComputerSoftwareSystems.com
User avatar
BRobinsonS
 
Posts: 337
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest