How to know MS Access Database is down through Java
How i would know whether MS Access DataBase is down?
Is there any specific code for it in Java
Need a quick reply
How i would know whether MS Access DataBase is down?"down"? If the file system on which it's running is unavailable, that's the best you can do. If you can't connect, it's "down".
Is there any specific code for it in JavaNo. Doesn't sound very platform-independent.
Need a quick replyFast enough?
%
Similar Messages
-
Based on a SQLException how to know if the database is down?
Hi
How can I know based on a SQLException that the database is down?. I know I can check the errorCode but which error codes indicate that the database is DOWN or not available?
Regards,
Néstor BoscánIf the SQLException is IO exception: Connection refused, one of the causes is that the database instance has not been started. If the SQLException is
IO exception: The Network Adapter could not establish the connection., one of the causes is that the database TNSListener has not been started. -
How to use MS Access database in Flash CS4 using AS3
Hello everyone,
I need help for how use the MS Access database in FlashCS4 and I want to save and retrive the data from the database and display in the Flash window.
Thanks with,
Viswa.http://www.northcode.com/blog.php/2011/05/06/Using-ADO-Data-Sources-in-Flash-Projectors
-
How to know last access date for the schema's
Dear all,
could u plz tell me How to know last access date for the schema’s
Regards,
Srinivasa rao.PSrinivas,
could u plz tell me How to know last access date for the schema’s
In Oracle, we don't access schemas but schema objects.And this informationis not kept anywhere persistantly.As Amit also mentioned,if you do need it,you have to enable Auditing.
Aman.... -
How to import Ms Access database in Oracle 11g
how to import Ms Access database in Oracle 11g
google the subj. search terms reveals a tutorial ...
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/hol08/sqldev_migration/msaccess/migrate_microsoft_access_otn.htm -
How to upload 20MB of file into MySQL through Java
Hi Friends
Anyone let me know how to upload 20MB of file into MySQL through Java programming, is there is any feature available, or any changes to be made in MySQL
Thanks
SellaDon't know. Ask the MySQL folks. This is not a Java issue.
-
How to send data to bam data object through java code
how to send data to bam data object through java code
I've made a suggestion in other thread: https://forums.oracle.com/thread/2560276
You can invoke BAM Webservices (Using Oracle BAM Web Services) or use JMS integration using Enterprise Message Sources (http://docs.oracle.com/cd/E17904_01/integration.1111/e10224/bam_ent_msg_sources.htm)
Regards
Luis Fernando Heckler -
How to connect my access database using applet?
hi all,
i need to connect my access database in my applet program which should work like an atm machine..I dont know how to connect it. Im new to applet same thing in JDBC application. Please help i terribly need it, our deadline in our case study is fast approaching and i still dont know how to do it. I tried the tutorial but i received some sql exception error. thanks!Try this link
http://java.sun.com/docs/books/tutorial/jdbc/basics/ -
How to create a ms-access database at runtime using java
hi, this is ravi kiran,
i have a situation where i need to create a new ms-access database with one table in it at runtime(when user clicks on some button).
i have been searching many sites to know how to do this in java, but i didnot find any thing useful.
plz tell me how to do this in java.
plz help me, its urgent
thanx in advance.Here's how I did it. Research does help, but sometimes looking at others code does too... You do have to have a dummy file that you made with access though. You can't just make a file file.mdb (it will be corrupt)
public void createDatabase(String database) throws SQLException{
try{
// This file needs to have been created with MS Access
File dbfile = new File(this.dataBaseDir + "dummy.mdb");
// This is the new database file being made
File newFile = new File(this.dataBaseDir + database + ".mdb");
// Copy all bytes from dummy file to new DB file.
FileInputStream instream = new FileInputStream(dbfile);
FileOutputStream ostream = new FileOutputStream(newFile);
int numBytes = instream.available();
byte inBytes[] = new byte[numBytes];
instream.read(inBytes, 0, numBytes);
ostream.write(inBytes, 0, numBytes);
catch(FileNotFoundException e) { e.printStackTrace();}
catch(IOException e) { e.printStackTrace();}
if(DEBUG) System.out.println("creating the " + database + " database");
} -
How to reference MS Access database in ColdFusion MX 7 on 64-bit Windows
I am migrating customers from:
Windows 2000 Server (fully patched)
Internet Information Services (IIS) 5
ColdFusion 5
to:
Windows Server 2003 Standard x64 Edition (fully patched)
Internet Information Services (IIS) 6 (running in 32-bit
mode)
ColdFusion MX 7 (7.0.2) Standard
Unfortunately, some of these existing customers are still
using Microsoft Access databases instead of SQL Server. Having all
of these existing customers migrate to SQL Server is not yet
practical. On the old Windows 2000 / ColdFusion 5 server, they are
using OLE DB data sources to reference the MS Access databases
using the "Microsoft.Jet.OLEDB.4.0" provider. None are configured
to use ODBC drivers when referencing MS Access or SQL Server.
I have yet to figure out how to get ColdFusion MX 7 to:
- Create a data source that references MS Access databases on
64-bit Windows.
- Reference an existing MS Access data source created with
the 32-bit version of the ODBC Data Source Manager on 64-bit
Windows.
A bit of background information regarding MS Access on 64-bit
Windows:
- At the time of this writing, Microsoft has not
created/released 64-bit drivers for Microsoft Access and it's
unlikely they ever will, for understandable reasons.
- Contrary to seemingly popular belief, the Microsoft Jet 4.0
Database Engine does exist on 64-bit Windows. See the following
regarding version and file location information:
How to obtain the latest service pack for the Microsoft Jet
4.0 Database Engine
http://support.microsoft.com/kb/239114
- You CAN create MS Access based data sources within 64-bit
Windows, but they have to be made using the 32-bit version of "ODBC
Data Source Manager". I'm assuming these DSNs may only be used by
32-bit applications, but I have not tested that theory.
32-bit data sources:
ODBC Data Source Manager:
%SystemRoot%\SysWOW64\odbcad32.exe
Registry location:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC
Default file DSN directory:
C:\Program Files (x86)\Common Files\ODBC\Data Sources
64-bit data sources:
ODBC Data Source Manager:
%SystemRoot%\system32\odbcad32.exe
Registry location:
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC
Default file DSN directory:
C:\Program Files\Common Files\ODBC\Data Sources
The 64-bit version of "ODBC Data Source Manager" (under
Administrative Tools) only show "SQL Server" and/or "SQL Native
Client" as options when creating new data sources, unless
third-party software is installed that supplies additional drivers.
The 32-bit version of "ODBC Data Source Manager" (by default,
there is no shortcut for this in the Start menu) shows the typical
drivers seen on 32-bit versions of Windows, including SQL Server,
SQL Native Client, Microsoft Access, Excel, FoxPro, Paradox, etc.
When using ColdFusion Administrator in ColdFusion MX 7.0.2 in
64-bit Windows 2003 (IIS is running in 32-bit mode to allow
ColdFusion MX 7 to function at all), two problems are encountered
when dealing with MS Access (and presumably other 32-bit drivers).
In both cases, ColdFusion is trying to reference the registry
location for 64-bit data sources instead of 32-bit:
1. Creating a new data source within ColdFusion
Administrator:
Data Source Name: whatever
Driver: Microsoft Access
CF Data Source Name: whatever
Database file: (physical path to whatever.mdb)
(other settings are irrelvant for this example)
Error generated when submitting:
Unable to update the NT registry.
Cannot open HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC
Data Sources: Windows error number 5 occurred.Access is denied.
ColdFusion stores the data source, however a "verify"
generates the following error:
Connection verification failed for data source: whatever
java.sql.SQLException: [Macromedia][SequeLink JDBC
Driver][ODBC Socket]internal error: Data source name not found and
no default driver specified
The root cause was that: java.sql.SQLException:
[Macromedia][SequeLink JDBC Driver][ODBC Socket]internal error:
Data source name not found and no default driver specified
2. Creating the data source using the 32-bit version of "ODBC
Data Source Manager" then trying to reference it with ColdFusion:
ODBC Data Source Manager:
System DSN or File DSN:
Name: whatever
Driver: Microsoft Access Driver (.mdb)
Database: (physical path to whatever.mdb)
(creation is successful within ODBC Data Source Manager)
Reference the above DSN within ColdFusion Administrator:
Data Source Name: whatever
Driver: ODBC Socket
Error generated when submitting:
Error accessing available odbc datasources. - Cannot open
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources:
Windows error 2 occurred.The system cannot find the file specified.
ColdFusion MX 7 can't find the 32-bit data source on 64-bit
Windows because it's looking for it in the wrong registry location.
Can ColdFusion MX 7 be configured to look in
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC
instead of
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC
on a 64-bit Windows machine?Paul,
Thanks for the insight on this. Regarding the initial problem
I ran into with creating Access based DSNs, very early-on, I
noticed there were two different driver options for Access
displayed within ColdFusion MX 7 Administrator:
Microsoft Access
Microsoft Access with Unicode
For reasons I'm am still baffled over, I somehow completely
forgot about and through the wonders of apparent tunnel vision,
completely overlooked the "Microsoft Access with Unicode" driver
option when I was running through my tests.
At your seemingly-obvious suggestion, I created a data source
using the Microsoft Access with Unicode driver and it worked
perfectly fine with the one customer's web site I'm using for
testing (of course, this is a copy--the production site is still
housed on the old ColdFusion 5 server). This obviously doesn't
actually fix the underlying issue with ColdFusion looking in the
wrong part of the registry on 64-bit Windows, but at least when it
comes to dealing with Access databases, your suggestion of using
the Microsoft Access with Unicode driver appears to be a functional
work-around. So long as there aren't any surprises waiting for me,
hopefully this will also work for the remaining ColdFusion sites I
have to migrate that are using Access databases.
Since you mentioned JDBC drivers in comparison with ODBC, I'm
pointing out a couple of references in case they're helpful to
anyone following this thread:
ColdFusion MX 7 - About JDBC
http://livedocs.adobe.com/coldfusion/7/htmldocs/00001736.htm
Types of JDBC technology drivers
http://java.sun.com/products/jdbc/driverdesc.html
http://java.sun.com/products/jdbc/
I don't actually develop anything in ColdFusion, so I'm
dealing with all of this from a server administration standpoint
since we do have some domain hosting customers that do develop or
at least have existing ColdFusion based sites. I am all
too-familiar with the caveats of using Access in any kind of
production or heavily used environment and have spent years keeping
users away from ODBC. For ColdFusion users, that meant creating OLE
DB DSNs and often having to fix poorly written SQL statements and
fixing ColdFusion date-related values and boolean values (the
common problems encountered when switching CF / MS Access users
from ODBC to OLE DB). I can only recall running into problems with
a single SQL Server based ColdFusion site when migrating from ODBC
to OLE DB. That customer never did get their many coding problems
fixed, so they're the only ones still using ODBC in CF. I have no
idea what'll happen when that one site gets migrated over--if it'll
even work. Obviously a lot of things have changed between
ColdFusion 5 and the MX versions that have come along afterward.
Thanks again for the Access with Unicode driver tip and JDBC
info. It looks like I can finally start moving forward again with
the site migration process.
Josh -
How to access MS ACCESS database from Solaris running Java application
Hello I have a reqmt
My Java application is running on Weblogic server on Solaris 2.7 and now I want to connect to MS Access database running on Win NT.
How do I do that??
Any help is appreciated
Thanks
SureshYou have to use a proxy server and client.
You can search for commercial solutions via the sun jdbc site or use RmiJdbc at http://www.objectweb.org/ -
How to know whether the database is using SPFILE or PFILE
How can i know whether the database is using SPFILE or PFILE.
There are both initSID.ora and spfileSID.ora in default location.
The registry entry for ORA_SID_PFILE is C:\oracle\ora90\database\initSID.ora
Also, if it is using SPFILE than how can i modify the non dynamic parameters when the database is in the close state.
ManuIf you do not specify a path of a pfile , when you actually startup a database , then it will be use your pfile , if you specify a path explicitly fot a pfile , then it'll use your pfile.
Also, if it is using SPFILE than how can i modify the non dynamic parameters when the database is in the close state.sql > create spfile from pfile ;
the spfile will syncronise with pfile .
Hare krishna
Alok -
How to use an access database file with vb project
hi deve.
im wondering how can i use a database file (created with microsoft access) in a vb project
i want to assign a textbox content from the database file from a specific field according to its id can anyone explain that with a simple code example
thanx..thanx
pvdg42
this article is all i need -
How to know the OMR database from OMA or from OMS
Hi all DBA,
I found an OMA on a server, how to know where is his database repository. ( OMR )
Thanks in advance.Run
emctl status agent
and check for
Repository URL
Werner -
Access database query resultset in java scriptlet
Question:
1) I am Creating a web page and plotting points on the page:
2) Database query results in decimal values dec_latitude and dec_longiitude.
3) Perform calculations on lati. & long. in a java scriptlet to create a plot position (xpos, ypos).
4) Send the xpos and ypos back to the java server page
5) Use <IMG and absolute positioning to plot the point at position xpos, and ypos.
6) Repeat until all rows in the query result set have been plotted.
I don't know how to pass the dec_latitude and dec_longitude to the java scriptlet.
After the java scriptlet calculation translates the latitude and longitude
into xpos and ypos, I need to pass the xpos and ypos back to the java server page so that a data point is plotted on a map at position xpos, ypos.
I tried many ways of doing it but am just guessing as
to how to pass the data.
Thanks in Advance. - John
Here is what I am trying so far .... see snippet below:
The code below results in a runtime error.
Am I supposed to create a java object and access that in the java scriptlet? Can the java scriptlet access the latvar and longvar created during the "<c:set var="latvar"... ?
If not, what mechanisum do I use to access the resulting colums: dec_latitude and dec_longitude? I need the java scriptlet to convert the
dec_latitude and dec_longitude into a display position based on the number of pixels from the TOP and LEFT (xpos, ypos). Then plot of the data point using the IMG and (xpos, ypos). This will overlay a map whose z-index is lower than the plotted data point.
*** Query the database ***
<sql:query var="qryBio">
SELECT
DEC_LATITUDE,
DEC_LONGITUDE,
ENTRY_TIMESTAMP
FROM app.biosurvey where
</sql:query>
*** for each row retreived from the database ***
<c:forEach var="row" items="${qryBio.rows}">
<c:set var="latvar" value="${row.dec_latitude}" scope="page"/>
<c:set var="longvar" value="${row.dec_longitude} "scope="page" />
*** java code scriptlet - ***
*** convert latitude and longitude to xpos and ypos for display ***
<%
latitude = (Float)pageContext.getAttribute("latvar"); <--- runtime error !!!!
longitude = (Float)pageContext.getAttribute("longvar");
xpos = (int)Math.round(latitude);
ypos = (int)Math.round(longitude);
xpos = 1082 - xpos;
ypos = 700 + ypos;
pageContext.setAttribute("xpos", xpos);
pageContext.setAttribute("ypos", ypos);
%>
*** plot a point on the display html page overlaying the map ***
<IMG ID="Row" SRC="smallredbox.jpg" ALT="red box"
STYLE="position:absolute;
top:<%=xpos%> px;
left:<%=ypos%> px;
z-index:2">
</c:forEach>Thanks
I still get a runtime error: I translated the code you gave to code below .... which I think is equivalent. See Below: I'm still learning about this stuff so I may not have not translated this properly. Do
you see what I am doing wrong?
Best Regards,
- John
%@ page language="java" contentType="text/html;
charset=ISO-8859-1"%>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page import="java.lang.Math"%>
<sql:setDataSource dataSource="jdbc/SampleDB" />
<c:set var="genus_name" value="${param.genus_name}" />
<c:set var="species_name" value="${param.species_name}" />
<c:set var="species_common_name" value="${param.species_common_name}" />
<c:set var="dd_sighted" value="${param.dd_sighted}" />
<c:set var="mm_sighted" value="${param.mm_sighted}" />
<c:set var="yyyy_sighted" value="${param.yyyy_sighted}" />
<c:set var="species_state" value="${param.species_state}" />
<c:set var="species_county" value="${param.species_county}" />
<c:set var="species_country" value="${param.species_country}" />
<c:set var="dec_latitude" value="${param.dec_latitude}" />
<c:set var="dec_longitude" value="${param.dec_longitude}" />
<c:set var="notes" value="${param.notes}" />
<c:set var="person_first_name" value="${param.person_first_name}" />
<c:set var="person_last_name" value="${param.person_last_name}" />
<c:set var="person_street" value="${param.person_street}" />
<c:set var="person_city" value="${param.person_city}" />
<c:set var="person_state" value="${param.person_state}" />
<c:set var="person_zip" value="${param.person_zip}" />
<c:set var="person_country" value="${param.person_country}" />
<c:set var="person_email" value="${param.person_email}" />
<h2>Species Sightings:</h2>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Breckenridge Citizen Bio-Survey Selective Output Page</title>
</head>
<body>
Izaak Walton League of America
<h1>Breckenridge Citizen Bio-Survey Selective Output</h1>
<HR>
<c:if test="${param.action == 'Submit'}">
<%int xpos = 0;
int ypos = 0;
float latitude = 0.0F;
float longitude = 0.0F;
float latitudeMpls = 45.06F;
float longitudeMpls = -93.14F; int xposMpls = 1205 - (int) Math.round(latitudeMpls);
int yposMpls = 735 + (int) Math.round(longitudeMpls);
%>
<IMG SRC="minnesota_1990.jpg" ALT="minesota map" style="z-index:1;"> <----- THIS WORKS FINE
<IMG ID="Row" SRC="smallredbox.jpg" ALT="red box"
STYLE="position:absolute;
top:<%=xposMpls%> px;
left:<%=yposMpls%> px;
z-index:2"> <----- THIS WORKS FINE FOR HARDCODED MPLS XPOS AND YPOS
<sql:query var="qryBio">
SELECT
PERSON_FIRST_NAME,
PERSON_LAST_NAME,
GENUS_NAME,
SPECIES_NAME,
SPECIES_COMMON_NAME,
SPECIES_COUNTY,
SPECIES_STATE,
SPECIES_COUNTRY,
DD_SIGHTED,
MM_SIGHTED,
YYYY_SIGHTED,
DEC_LATITUDE,
DEC_LONGITUDE,
NOTES,
ENTRY_TIMESTAMP
FROM app.biosurvey where
genus_name like rtrim(upper('${genus_name}')) AND
species_name like rtrim(upper('${species_name}')) AND
species_common_name like rtrim(upper
('${species_common_name}')) AND
species_state like rtrim(upper('${species_state}')) AND
species_county like rtrim(upper('${species_county}')) AND
species_country like rtrim(upper('${species_country}')) AND
person_first_name like rtrim(upper('${person_first_name}')) AND
person_last_name like rtrim(upper('${person_last_name}')) AND
person_email like rtrim(upper('${person_email}'))
</sql:query>
<c:forEach var="row" items="${qryBio.rows}">
<--- THE LINE ABOVE WORKS FINE --->
<c:set var="latvar" value="${row.dec_latitude}" scope="page" />
<c:set var="longvar" value="${row.dec_longitude} " scope="page" />
<%
latitude =
Float.parseFloat((String)pageContext.getAttribute("latvar"));
<--- RUNTIME ERROR OCCURS HERE --- SEE LINE ABOVE --->
longitude =
Float.parseFloat((String)pageContext.getAttribute("longvar"));
xpos = (int) Math.round(latitude);
ypos = (int) Math.round(longitude);
xpos = 1082 - xpos;
ypos = 700 + ypos;
request.setAttribute("xpos",new Integer(xpos));
request.setAttribute("ypos",new Integer(ypos));
%>
IIMG ID="Row" SRC="smallredbox.jpg" ALT="red box"
STYLE="position:absolute;
top:<%=xpos%> px;
left:<%=ypos%> px;
z-index:2">
<--- THIS (ABOVE) WORKS FINE WITH CORRECT VALUES FOR XPOS AND YPOS WHEN RUNTIME ERROR DOES NOT OCCUR --->
</c:forEach>
</c:if>
Maybe you are looking for
-
Can anybody explain how to configure the Centralized contract in SRM 7
Hi All, Can anybody explain how to configure the Centralized contract management in SRM 7 with ECC EHP4 ?what are all that need to be perform in PI system. Thank you, praveen
-
O2 uk will not unlock the phone for me as I do not have a UK phone number anymore! Is there any other way or have I now got a phone which is worth nothing!
-
File damaged only when emailing it.
Hello, I have a fill-in file that I use to bill for jobs that I received from my company. I am able to print it and open it after saving it on my computer. However, if I email it to anyone, the receiver of the email gets an error message that says:
-
MEASURING FORCE ON BALANCE USING AN ELECTRONIC BALANCE FROM THE SERIAL PORT
Hi, I am trying to measure FORCE using an electronic BALANCE from the serial port. My measurements are strange! The BALANCE sometimes give ZERO reading! Is it because of the sample rate, baud rate etc? I have attached the readings concerned. Attachme
-
Hi guys, My macbook pro late(dec) 2011, doesn't boot up anymore, it just turns off after the chime (whilst a gray bar is loading a bit and then the MB shuts off)... This all happened after I upgraded to mavericks, safari and chrome were spontaneously