How to query a database file on my hard drive?

Hi,
I have a filer called "server.dbs" on my hard drive. It is a database file. I use a simple program that allows you to view databases, and it loads up and I can traverse the database and see all the entries as any standard database.
So I figured that Java's ability to handle SQL would allow me to make a standard SQL statement querying the database, and be able to get the results. The software stores servers in SID fields, and the value is the port the server runs on. I want to make a simple query to select a server by SID, and print the port in which that server is running on.
So is there any way to, via my java application, load a database from a file (rather than a url) which has no authentication required, and simply make my queries directly to that file? If so, how?
Thanks!
-Josh

Normal database access is via JDBC.
http://java.sun.com/docs/books/tutorial/jdbc/index.html
To use that JDBC driver is needed to access the database. Databases in wide usage all have one. It isn't clear from your posting that you have a common database though.

Similar Messages

  • How do I back up files to external hard drive in order to upgrade operating system?

    How do I back up files to external hard drive in order to upgrade operating system?

    Buy yourself a portable hard drive from WD or the like.  It should have a capacity at least twice that of your machine hard drive.  Then follow the instructions that come with it; it is quite straightforward.
    I have a similar machine to you by the sound of it.   After the initial back up, it is just a matter of topping up every couple of months or so, plus whenever you do to back up any major upgrade.
    A portable one is good because you can store it with relatives when not in use which gives protection in the case of fire or theft.
    I use two backups.   One, an external HD permanently connected for my Time Machine and the second, a portable for the reasons I gave.

  • How do I move my files from one Hard Drive to another?

    I have all of my music and podcast files on one hard drive (my external hard drive).  My "Library" files are on my internal hard drive.
    How can I move my external hard drive files to my internal hard drive files without having to manually find all of them? I have some 12,000 songs, and so dont' want to do it manually.
    Please advise -
    Thank you!
    chris

    First off, are your song files in .WAV format?  If they are not, then these directions should work.
    Secondly, it assumes you are OK with the iTunes Way of organizing files. Which means artist folders with album sub-folders.
    If you have some other special setup in the way you organize your folders that I don't know about, now would be the  time to mention it ; )
    Basically, you use a special itunes "consolidate library" command to move everything over, as explained in this article:
    http://support.apple.com/kb/ht1364
    Post back if you have any questions!

  • How do I get FLAC files from a hard drive into my itunes

    I have a library of FLAC and shnf files on a hard drive.
    How do I get these files (grouped into hundreds of folders) into Itunes?

    iTunes cannot play FLAC files.  There are "plug-ins" that supposedly allow iTunes to handle FLAC, which you can investigate, but it would probably be better to convert the files to a format iTunes can handle, such as AAC. 
    As far as SHN files, there is not even a plug-in (the format is virtually unknown except Deadheads!) so conversion is the best answer.
    A conversion tool you can use is Switch.  You can use the newly converted files for your iTunes ibrary, and save the original FLAC and SHN files for when you use a more capable player.

  • How do you move video files from external hard drive?

    I moved video files that were originally from Flip Video recorder and uploaded to my Macbook to an external hard drive to save space.  However, I can't seem to figure out how to get them back onto my computer, so I can start burning DVDs.  I tried dragging and dropping, but that doesn't seem to work.  Please help!!

    Copy /Home/Pictures/iPhoto Library to your external drive. Delete the one on your internal drive. Now create an alias to the iPhoto Library's new location and put the alias in the original location. Be sure the alias is named "iPhoto Library".

  • How to move all graphic files to another hard drive?

    Sorry that I do not even understand the program well enough to use the specific terms but my wife is using Photoshop Elements 4 and has thousands of graphic files. She wants to move them all to another hard drive to free up space on C drive.
    1 - How do we move all the files without confusing the organizer? My wife found a move function but still has two problems: 1- Can't figure out how to tell the program where to put the files (seems like it may have just created another copy on C drive). 2- the organizer has to reconnect to every single file that is moved - a process that takes hours.
    2 - How do we change the settings so that Elements will store files on the new G drive instead of continuing to put everything on C drive? Most of her new files are camera uploads and scans.
    3 - After we get the files set up on G drive, is there an easy way to identify and remove the old files on the C drive? (Judging from the amount of space that is filling up on the C drive, it seems that the program must have duplicated the files on C drive in our previous attempts to move files.)

    I can help with some of this...
    The simple way to move the files is using Folder View. You can then simply drag and drop images - or whole folders - to the new drive. It will take a little while to sort out the catalog, but nothing painful. No reconnecting is necessary.
    Go to Edit/Preferences. There is a setting there that determines where image files are stored.

  • How to save Flip video files to external hard drive (and need new vid camera rec)?

    I am trying to back up my Flip videos from my MacBook OS X 10.5.8 on to my external hard drive. They will not drop & drag directly from the flipshare software and I did locate all the mp4 files in my finder under "All Videos" where I think I can copy them over but they are not organized by title or anything and I only want to back up the clips I've edited and the movies I've created, not all the raw footage.
    I'm wondering if I'm going to have to import all of these files into iMovie in order to do this in a way that will be helpful? that seems like it will take forever since *I think* you have to do them one at a time and I have almost 2 years of footage of my kids...Is there a quick way to import video into iMovie?
    Side bar, anyone know of a good video camera that is small & easy like Flip but not part of a phone? My flip has died & since Cisco is abandoning the brand, I need something new.
    Thank you!

    I am trying to back up my Flip videos from my MacBook OS X 10.5.8 on to my external hard drive. They will not drop & drag directly from the flipshare software and I did locate all the mp4 files in my finder under "All Videos" where I think I can copy them over but they are not organized by title or anything and I only want to back up the clips I've edited and the movies I've created, not all the raw footage.
    I'm wondering if I'm going to have to import all of these files into iMovie in order to do this in a way that will be helpful? that seems like it will take forever since *I think* you have to do them one at a time and I have almost 2 years of footage of my kids...Is there a quick way to import video into iMovie?
    Side bar, anyone know of a good video camera that is small & easy like Flip but not part of a phone? My flip has died & since Cisco is abandoning the brand, I need something new.
    Thank you!

  • How do I delete the files on my hard drive but keep all the applications?

    I have an old MacBook Pro. By old, I mean abiut three or four years. I recently upgraded to Lion, but I have so many files that my system is forever showing thte rainbow spinner. I copied everything to an external hard drive, and would like to erase everything but my applications. Is there an easy way to do this?

    Ok....Here we go.....
    First open disk utility - then hit verify your disk.
    Once that's done, verify your disk permissions - hit repair disk permissions if there are errors.
    Once that's all done, restart your macbook.
    Now you've done all those, delete all the files you've copied over to your backup/external drive.
    If you've made folders for them, you can safely delete them.  Only do this if you've made copies of those files in your external drive.
    most of those files will probably in your document/movies/pictures folder.  If you've copied them over to your external then you can delete them.  Be sure you have copies before you delete them.
    also delete anything in your download folder.
    once you've done those, go to the appstore and download ccleaner.  it is a small yet effective hard drive cleaner.  no advance settings to mess around with.  it will just delete your cache files and old log files.
    good luck.
    PS - to delete some of them you must move your mouse over it, tap once then keep your finger in the shift button then use your arrow keys to highlight them.  once you've highlighed those files, right click on them then move to trash.

  • How can I see all files of my hard drive? it is 1TB and don't have any documents in it yet, and it says that it is only 200GB free

    In my apple store, they replaced my hard-drive. Now, it is only 273GB free instead of almost all my 1TB. I can't see what are the files with such a size!

    Give OmniDiskSweeper a try.

  • How can I import AVCHD files from my hard drive?

    - How can I work with .mts files from my Sony camera that I dragged from the camera to a folder on my computer. If I understand it well, if I import the files with a Log and Transfer, they will be converted to another format.
    - do they lose quality with the Log and Transfer conversion?
    I want to erase my sony camera hard disk but do not want to lose the original files, that is why I ask.

    Hi -
    In order to use the files from your camera easily (without 3rd party software) you need to not only drag the mts files, but the ENTIRE DIRECTORY STRUCTURE of the camera storage to your hard disk drive. Many people find it most convenient to use Disk Utility to make a disk image of the camera storage media, and keep the disk image on their hard disk, available for re-use at any time.
    The additional folders that are present on the camera storage give necessary and valuable information to Final Cut as to how to "unpack" the extremely compressed video files. Without these files as guides and instructions, it becomes a much more difficult process.
    MtD

  • Help reading a .txt file from the hard drive....

    Hi guys,
    Ok... I need to know how to read a .txt file from the hard drive... I have an example on how to read from a disk, but I don't have a disk drive. I could be confusing terminology, but I don't think I am. Here is the code I have for reading from a disk.. please let me know how I should change it to read from a hard drive.
    Also, when the error pops up, it says that it can't read another .txt file that is not specified in the code... any ideas how that is occuring? Please advise.
    import java.io.*;
    public class TEST {
    public static void main(String args[]) throws Exception{
    FileReader fr = new FileReader("customer.txt");
    BufferedReader bfr = new BufferedReader (fr);
    String s;
    while ((s=bfr.readLine())!= null){
    System.out.println (s);
    fr.close();
    }

    Ok... I need to know how to read a .txt file from the
    hard drive... I have an example on how to read from a
    disk, but I don't have a disk drive. I could be
    confusing terminology, but I don't think I am. Here
    is the code I have for reading from a disk.. please
    let me know how I should change it to read from a
    hard drive.The code will be the same, regardless of where the file is located. It's just the filename that will be different.
    Also, when the error pops up, it says that it can't
    read another .txt file that is not specified in the
    code... any ideas how that is occuring? Please
    advise.Probably becuase the class file (compiled version of the source code) is a different version to the source code, i.e. the source code hasn't been recompiled since the source code was changed.
    How does this relate to EJBs?

  • How can I erase deleted items from the hard drive?

    How can I erase deleted files from the hard drive?  Will my machine run faster?

    If you've already deleted the files and emptied the Trash they are already, in effect, erased. At least the disk space they occupied is now available.
    To be able to offer help we need more information about which Mac you have, which OS you are running, how much RAM you have installed, how much hard disk space you have available, etc.
    Go to the Apple Menu>About this Mac - copy and paste the contents of the report here (deleting the serial number of your machine). Once we have that info, I'm sure someone will have some suggestions.

  • How to specify the database file path when create FDM application

    Dear All,
    How to specify the database file path (MSSQL) when create FDM application?
    Right now, all data file are placed in the D:\ . I want to specify the database files (log and mdf file) in other place. How to do it?
    Thanks.

    Where is the highS2.xml located on the disk? If you add it to your project you should set its Build Action to Content and its Copy To Output Directory to Always in Visual Studio:
    Please remember to close your threads by marking helpful posts as answer once your issue has been solved and then start a new thread if you have a new question.

  • How to query the flat files?

    Hi
    How to query the flat files that are used in Etl From EBS source.

    That can be done in OBIEE. Save the flat file as .csv format. Then go to ODBC Administrator on windows machine where you BI server is running, and create an System DSN and select "Microsft Access Text Driver (*.txt, *.csv)" as driver type.
    Next, import tables in RPD using this ODBC connection. Rest of the steps as same as building model from a table source.
    Hope this helps.

  • How to Query a database table of a remote system in a program.

    How to Query a database table of a remote system in a program.
    Thanks in adv.
    -Satish

    1.Create an RFC(SE37) in Source (To Where you want to get data)
    IMPORTING MATNR
    EXPORTING : SYS TYPE SY-SYID
                         I_MARA TYPE MARA
    SELECT SINGLE * FROM MARA INTO I_MARA WHERE MATNR EQ MATNR
    2.Copy the same RFC to Target(From Where you want to get data)
    3.Create a RFC destination(SM59.) in Source
    Enter the connection type as 3 and enter the target host  and system number ( may be 00)
    4.Create a program to calling RFC in Source.
    PARAMETERS: p_matnr LIKE mara-matnr.
    PARAMETERS: p_dest LIKE rfcdes-rfcdest DEFAULT 'NONE'.
    DATA: system LIKE sy-sysid.
    DATA :i_mara TYPE mara.
    CALL FUNCTION 'XX_RFC_GET_TEST' DESTINATION p_dest
      EXPORTING
        matnr                 = p_matnr
      IMPORTING
        sys                   = system
        i_mara                = i_mara
    :-Gopeekrishnan

Maybe you are looking for