ODBC setup with Online Access DB

Please support our MS Access and FileMaker Pro advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Oct 2004
Posts: 3
Reputation: Pabz is an unknown quantity at this point 
Solved Threads: 0
Pabz Pabz is offline Offline
Newbie Poster

ODBC setup with Online Access DB

 
0
  #1
Oct 28th, 2004
Have setup several ODBC links to local access DBs, and thought it would be just as simple wanting to link to an Access DB stored on my personal webspace, but no...

Asks for username / password when I type in the url of the online DB in the ODBC setup, and it doesn't accept the username/pwd that I have for the webspace. And insists on putting the webspace url in the username box every failed login attempt.

Is it that my isp webspace simply doesn't allow it, or am I missing something?
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 8
Reputation: AwSDesigns is an unknown quantity at this point 
Solved Threads: 0
AwSDesigns AwSDesigns is offline Offline
Newbie Poster

Re: ODBC setup with Online Access DB

 
0
  #2
Nov 8th, 2004
Your hosting Probably doesnt have an access driver on thier system!
On your local computer you (i am sure) have access installed on your computer.
what error text is generated?
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 3
Reputation: Pabz is an unknown quantity at this point 
Solved Threads: 0
Pabz Pabz is offline Offline
Newbie Poster

Re: ODBC setup with Online Access DB

 
0
  #3
Nov 10th, 2004
Yup came to the same conclusion, so looked around for some webspace that supports it, still can't get it working though. I'm guessing this is the correct way of doing it:

String url = "jdbc:odbc://www.websamba.com/myspace/DSNname";

Error: Cannot connect to the database.java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

I'm using www.websamba.com as they boosted free space, and free setup of ODBC System DSN, but after setting up the DSN for my DB I can't get it to work.

Will send a reward over Paypal to anyone who can get it working! =/
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 3
Reputation: Pabz is an unknown quantity at this point 
Solved Threads: 0
Pabz Pabz is offline Offline
Newbie Poster

Re: ODBC setup with Online Access DB

 
0
  #4
Nov 12th, 2004
Finally got it working after about 4-5 weeks of trying, 6 different types of error, using 3 different websites...

If anyone is interested this is how you can connect to an Access .mdb file stored on a website, without a DSN. This is the code...


Database = DriverManager.getConnection("jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=//www.website.com/yourfolder/YourDB.mdb","ID","PW");


(Note that the website used must support the access and storage of .mdb files, and the above code must use the actual address rather than a masked address, for example users.website.com instead of www.website.com)
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 1
Reputation: chrismogz is an unknown quantity at this point 
Solved Threads: 0
chrismogz chrismogz is offline Offline
Newbie Poster

Re: ODBC setup with Online Access DB

 
0
  #5
May 10th, 2005
hello, am trying to access the DB like you said above but i keep getting the following message: with

Connection databaseConnection = DriverManager.getConnection("jdbc:odbcriver={MicroSoft Access Driver (score.mdb)};DBQ=//www.monaghan-c.co.uk/java/score.mdb");

java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

or change the {MicroSoft Access Driver (score.mdb)} to {MicroSoft Access Driver (*.mdb)} i get
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Disk or network error.

The db is at that address and host supports the db. Please could any one help me out with this problem . the full code for the class is below:


import javax.swing.JOptionPane;




import java.sql.SQLException;
import java.lang.*;
import java.sql.*;


public class Main
{

public static void main(String[] args)
{
try {



Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

// String sourceURL = new String("jdbc:odbc:score");




Connection databaseConnection = DriverManager.getConnection("jdbc:odbcriver={MicroSoft Access Driver (score.mdb)};DBQ=//www.monaghan-c.co.uk/java/score.mdb");

Statement statement = databaseConnection.createStatement();
ResultSet score = statement.executeQuery("SELECT User-Name, Score FROM scoreboard");

while(score.next()) {
System.out.println(score.getString("User-Name")+" "+score.getString("Score"));
}

}catch(ClassNotFoundException cnfe) {
System.err.println(cnfe);
}catch(SQLException sqle){
System.err.println(sqle);

GameControl.newGame();

}
}

}


thanks for your time

chris mon
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 7
Reputation: digioz is an unknown quantity at this point 
Solved Threads: 0
digioz's Avatar
digioz digioz is offline Offline
Newbie Poster

Re: ODBC setup with Online Access DB

 
0
  #6
May 26th, 2005
Hello Guys,

I just found this thread through google, and wanted to add to what you guys already said that Instead of entering WWW URL's, you may also use server path to the file in question. To find out about your server variables, here is what you do:

1- Create a blank file and save it as "serverinfo.asp".

2- Enter the following code in that file to get all your server variables:

<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="750">
<tr>
<td valign="top" align="left" width="150"><font face="Arial" size="2" color="#FF0000"><b>Variable Name</b></font></td>
<td valign="top" align="left" width="600"><font face="Arial" size="2"><b>Value</font></b></td>
</tr>
<%
for each name in request.servervariables
%>
<tr>
<td valign="top" align="left" width="150">
<font face="Arial" size="1" color="#FF0000">
<%= name %></font></td>
<td valign="top" align="left" width="600">
<font face="Arial" size="1"><%= request.servervariables(name) %></font></td>
</tr>

<%
Next
%>
</table>
</div>

3- Look up the server variable for Path to your directory, where the ".mdb" file is at. It will be something like this:

C:/Inetpub/wwwroot/test.mdb

4- Use the connection string to connect to the database:

<%
dim cnn,rst
set cnn = Server.CreateObject("ADODB.Connection")
set rst = Server.CreateObject("ADODB.RecordSet")
cnn.Open "driver={Microsoft Access Driver (*.mdb)};;DBQ=C:/Inetpub/wwwroot/test.mdb;"
sqltext = "SELECT * FROM test"
rst.Open sqltext,cnn,3,3
%>

That's it! Again, thank you all for the initial thread. Very useful information.

Pete
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 1
Reputation: Dennis Banks is an unknown quantity at this point 
Solved Threads: 0
Dennis Banks Dennis Banks is offline Offline
Newbie Poster

New online game coming tips on what i should do

 
0
  #7
Jul 1st, 2005
1. How do i make a File were members can Register to the page and Do i need a database for this.

2. when making a online game do i need a Javascript.

3, in making a Database Do I need a server to or can I add a database to my FTP site.

4. Really new at this so its kind of comfusing I dont really know what all i need to make the game up and running far as Register, and a file that let the game know when a person has logged in to be able to change Stats.



If u would like to help your more then welcome!!!!!!! <EMAIL SNIPPED>
Last edited by peter_budo; Jun 7th, 2009 at 5:52 am. Reason: Emails in post not allowed
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 1
Reputation: spraveen2 is an unknown quantity at this point 
Solved Threads: 0
spraveen2 spraveen2 is offline Offline
Newbie Poster

Re: ODBC setup with Online Access DB

 
0
  #8
Jun 6th, 2009
Thank you for all the messages.

I tried using the following code (with proper user_id and pwd):
connection = DriverManager.getConnection("jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=//www.sivameyeclinic.com/www/Sivam_dev.mdb","user id","pwd");

but, get the message as:
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] '(unknown)' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.

I have the file Sivam_dev in www folder created for placing all the html files.

Could you please let me know what could be the problem.

Any small amount of guidance in this regard will be very much appreciated.
Last edited by peter_budo; Jun 7th, 2009 at 5:52 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the MS Access and FileMaker Pro Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC