title: Using Jaybird to connect to a Firebird database located in a computer in a local network
body: <p>I'm creating a java application that connects to a Firebird database and retrieve some data. The program is done, and it runs well in my computer. The problem is that, in the computer I need to run the application, the database is in another computer in the local network and I have no idea of which path should I put into the connection string of jaybird to get it running. Let me explain a bit:</p>
  
  <p>I need to run my application in a computer X, but the actual database is not in a drive in the computer, but in a computer in the local network. Something like this (this is an example, and its reproduced at my home, not at the actual site I need to get it to work):</p>
  
  <p><a href="https://i.stack.imgur.com/D8GfV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/D8GfV.png" alt="enter image description here"></a></p>
  
  <p>So the path that it gives me for the database is something like:</p>
  
  <p><a href="https://i.stack.imgur.com/cXOKY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cXOKY.png" alt="enter image description here"></a></p>
  
  <p>I know that if my database is in my drive ( for example, in C:\Users\john\Desktop ), my connection to the database using Jaybird should be something like this:</p>
  
  <pre><code>static final String FB_DB_URL = "jdbc:firebirdsql://localhost:3050/C:\\Users\\john\\Desktop\\TEST1.FDB";
  
  FB_connection = DriverManager.getConnection( FB_DB_URL , FB_USER , FB_PASS);
  </code></pre>
  
  <p>Actually, that is how I managed to make it work in my computer. But in this case I have no clue of how should the path be. I tried something like:</p>
  
  <pre><code>    static final String FB_DB_URL =  "jdbc:firebirdsql://192.168.0.101:3050/\\\\DESKTOP-1UFA09I\\Documents\\TEST1.FDB"; 
  </code></pre>
  
  <p>With ‘192.168.0.101’ being the ipv4 address of the computer where the database is. But this gave me an exception saying that the application was unable to find the database. I think this is the closest I was to find the solution, but I had no luck.
  Some extra information:</p>
  
  <ul>
  <li><p>Both computers had the firewall off, and could send ping to each other, so they are, in fact, connected.</p></li>
  <li><p>I'm using Firebird 2.5 and jaybird 2.2.1.</p></li>
  <li><p>I also tried the following with no luck:</p>
  
  <pre><code>static final String FB_DB_URL =  "jdbc:firebirdsql://192.168.0.101:3050/C:\\users\\john2\\Documents\\TEST1.FDB"; 
  </code></pre></li>
  <li><p>The folder is shared (or at least, that’s what I think) because I can get access to it via windows, and the database file gives read/write permissions to everyone.</p></li>
  <li><p>I'm sure that Firebird is running in both PCs.</p></li>
  </ul>
  
  <p>Any help in the matter would be greatly appreciated. I'm sure the problem is in the path, because, as I said, the application works well in with the database in my computer. Also, if you could give me a solution that doesn’t require the IP of the computer where the DB is stored that would be awesome, but I think I can get that information anyways.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>For documenting purposes the solution to the problem was the following:</p>
  
  <p>the right way of making the path to the database is:</p>
  
  <pre><code>"jdbc:firebirdsql://192.168.0.101:3050/C:\\folder1\\folder2\\TEST1.FDB";
  </code></pre>
  
  <p>the exception occurred because, apparently, jaybird has some permission issues with the <code>users</code> folder in the server. As my DB was located in the <code>documents</code> folder, it was causing some problems when jaybird tried to get access to it. the solution is to move the DB to another folder in <code>C://</code></p>