User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS Access and FileMaker Pro section within the Web Development category of DaniWeb, a massive community of 363,558 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,914 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS Access and FileMaker Pro advertiser:
Views: 14541 | Replies: 6
Reply
Join Date: Oct 2004
Posts: 3
Reputation: Pabz is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Pabz Pabz is offline Offline
Newbie Poster

ODBC setup with Online Access DB

  #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?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2004
Posts: 8
Reputation: AwSDesigns is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
AwSDesigns AwSDesigns is offline Offline
Newbie Poster

Re: ODBC setup with Online Access DB

  #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  
Join Date: Oct 2004
Posts: 3
Reputation: Pabz is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Pabz Pabz is offline Offline
Newbie Poster

Re: ODBC setup with Online Access DB

  #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  
Join Date: Oct 2004
Posts: 3
Reputation: Pabz is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Pabz Pabz is offline Offline
Newbie Poster

Re: ODBC setup with Online Access DB

  #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  
Join Date: May 2005
Posts: 1
Reputation: chrismogz is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
chrismogz chrismogz is offline Offline
Newbie Poster

Re: ODBC setup with Online Access DB

  #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  
Join Date: May 2005
Location: Chicago, IL
Posts: 4
Reputation: digioz is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
digioz's Avatar
digioz digioz is offline Offline
Newbie Poster

Re: ODBC setup with Online Access DB

  #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  
Join Date: Jul 2005
Posts: 1
Reputation: Dennis Banks is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Dennis Banks Dennis Banks is offline Offline
Newbie Poster

News New online game coming tips on what i should do

  #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!!!!!!! Toppdawggtk@aol.com
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MS Access and FileMaker Pro Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MS Access and FileMaker Pro Forum

All times are GMT -4. The time now is 5:25 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC