•
•
•
•
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
![]() |
•
•
Join Date: Oct 2004
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
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?
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?
•
•
Join Date: Oct 2004
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
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! =/
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! =/
•
•
Join Date: Oct 2004
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
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)
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)
•
•
Join Date: May 2005
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
hello, am trying to access the DB like you said above but i keep getting the following message: with
Connection databaseConnection = DriverManager.getConnection("jdbc:odbc
river={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:odbc
river={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
Connection databaseConnection = DriverManager.getConnection("jdbc:odbc
river={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:odbc
river={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
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:
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:
That's it! Again, thank you all for the initial thread. Very useful information.
Pete
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
•
•
Join Date: Jul 2005
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
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
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
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb MS Access and FileMaker Pro Marketplace
•
•
•
•
access apple bbc black friday broadcast code combo computing customers data distance education dropdownlist education experiment funds gift cards holiday holiday shopping india intel internet investments ip mac media microshaft microsoft module ms net online online education online shopping portfolio practices pro programming publishing retail retail stocks reuse shopping software stocks strayer study tips video web youtube
- how to update an access DB with vb.net? (ASP.NET)
- question about connecting odbc to sql through php script (PHP)
- Creating new install.php for existing setup (PHP)
- New key word not recoginized in VB6 connecting to Access (Visual Basic 4 / 5 / 6)
Other Threads in the MS Access and FileMaker Pro Forum
- Previous Thread: How do I replace worksheets in Excel?
- Next Thread: Access Query : How to get top 10 students based on Marks ?


Linear Mode