|
I have access database store on the server. One of my user perform data entry from the client machine via the mapped drive.
For the other user I plan to develop web application which access via the HTML page and retrieve data from the database. Is it possible for me to do that? I plan to do that with Visual Studio 2005.
Thank,
|
|
|
|
|
It is not important whether you are using HTML or VS 2005.
Which scripting language you are using is important.
For achieving the task you are trying to do, you need to use
server side scripting language like PHP or ASP.NET or something else
like AJAX.
In short you need to call server side transaction to fetch data from
MS Access database.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
do you know are there any article that I can read and do it?
|
|
|
|
|
|
|
I am trying to accessing SQL database from this given below code ... that i found on net. But there is problem at
Class.forName It shows error at browser ... Error is "Exception: com.mysql.jdbc.Driver". I've also tried one another example roseindia.com ... same error.
I've also tried another simple example like this from begining to class.form but again same error.
package DatabaseExample;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class DatabaseExample extends HttpServlet {
@Override
public void doGet(HttpServletRequest hsReq, HttpServletResponse hsRes) throws ServletException, IOException {
hsRes.setContentType("text/html");
PrintWriter objPrintWriter = hsRes.getWriter();
Connection con = null;
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql:///test","root", "secret");
if(!con.isClosed())
objPrintWriter.println("Successfully connected to " + "MySQL server using TCP/IP...");
} catch(Exception e) {
objPrintWriter.println("Exception: " + e.getMessage());
} finally {
try {
if(con != null)
con.close();
} catch(SQLException e) {}
}
}
}
modified on Monday, July 12, 2010 8:45 AM
|
|
|
|
|
khurram_shahzad wrote: Error is "Exception: com.mysql.jdbc.Driver".
Is there nothing more in the exception message?
Also the line
Class.forName("com.mysql.jdbc.Driver").newInstance();
makes no sense as you do not save the object created by newInstance() .
It's time for a new signature.
|
|
|
|
|
No its just this little exception ("Exception: com.mysql.jdbc.Driver") message only .... i think class may not found ...but i dodnt know why .. because in other example i include class library (import java.sql.DriverManager) but here's again same excaption message.
I'vs this example also,
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class getDataServlet extends HttpServlet {
@Override
public void doGet(HttpServletRequest hsReq, HttpServletResponse hsRes) throws ServletException, IOException {
hsRes.setContentType("text/html");
PrintWriter objPrintWriter = hsRes.getWriter();
String conURL = "jdbc:H:\\employee";
Connection connection=null;
try{
Class.forName("com.mysql.jdbc.Driver").newInstance();
}
catch (Exception e){
objPrintWriter.println(e);
}
}
}
in this program it will show this message little change but seems.
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
|
|
|
|
|
khurram_shahzad wrote: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
Well that seems quite clear, the class cannot be found in your system. You may need to add some extra jar files to your project.
It's time for a new signature.
|
|
|
|
|
I have the following HTML:
<body>
<div id="container">
<div id="top">
<h1>Header</h1>
</div>
<div id="leftnav">
<p>Left bar</p>
</div>
<div id="rightnav">
<p>Right bar</p>
</div>
<div id="content">
<p>Content</p>
</div>
<div id="footer">
<h4>Footer</h4>
</div>
</div>
</body>
and this CSS:
body
{
font-family: Verdana, Sans-Serif;
font-size:0.75em;
line-height:1.5em;
margin:1.5em;
}
#container
{
overflow:hidden;
min-width: 50em;
margin: 0.625em auto;
background-color: #fff;
color: #333;
border: 1px solid gray;
}
#top
{
padding: 0.5em;
background-color: #ddd;
border-bottom: 1px solid gray;
}
#top h1
{
padding: 0;
margin: 0;
}
#leftnav
{
float: left;
width: 10em;
margin: 0;
padding: 1em;
background-color:#ec7;
}
#rightnav
{
float: right;
width: 10em;
margin: 0;
padding: 1em;
background-color:#db6;
}
#content
{
margin-left: 10em;
margin-right: 10em;
padding-left:3em;
padding-right:3em;
padding-top:1em;
min-width:10em;
text-align:justify;
background-color:#bab;
}
#leftnav, #rightnav, #content
{
padding-bottom:1000em;
margin-bottom:-1000em;
}
#footer
{
clear: both;
margin: 0;
padding: 0.5em;
color: #333;
background-color: #ddd;
border-top: 1px solid gray;
}
The three DIVs (leftnav, content, rightnav) should be displayed as columns between top and footer DIVs. I managed this, but the 'columns' are not the same height when displayed (ie. the background color only extends as far as the text). This appears to be a common problem and I have found several workarounds. I have attempted to implement this one[^] but only the 'content' column extends properly. leftnav and rightnav background extends over the footer DIV covering its background (although the text 'Footer' is still visible). I would like all three columns to extend only as far as the footer.
Here is the picture.[^]
The bearing of a child takes nine months, no matter
how many women are assigned.
|
|
|
|
|
ha ha welcome to the weird and wonderful world of CSS.... there are entire websites devoted to this very topic, books even, and I wouldn't be surprised if there was a goddam TV series as well.
Can't be done, is the simple answer. The slightly longer one is that it can, but the hacks required will be too browser-specific to make it usable in the real world.
If you can get away with fixed-width columns you can force an answer using a background image. Otherwise, my serious advice (which will save you hours if not days of stress and frustration) is to use a table-based layout. Problem solved in two minutes. (And if anyone tries to tell you you can't use tables for web-page layout, just look pityingly at them, smile knowingly and walk away...)
|
|
|
|
|
Thank you for the answer. I realize that this is possible to achieve using tables (although I haven't tried it).
The bearing of a child takes nine months, no matter
how many women are assigned.
|
|
|
|
|
Actually, what I did wrong was putting the header and footer DIVs into the container DIV along with the three columns. When I put them out the layout works better:
<body>
<div id="top">
<h1>Header</h1>
</div>
<div id="container">
<div id="leftnav">
<p>Left bar</p>
</div>
<div id="rightnav">
<p>Right bar</p>
</div>
<div id="content">
<p>Content</p>
</div>
</div>
<div id="footer">
<h4>Footer</h4>
</div>
</body>
The bearing of a child takes nine months, no matter
how many women are assigned.
|
|
|
|
|
Nice enough in Firefox and Chrome - you might want to look at it in IE though...
|
|
|
|
|
It looks like this[^] in IE 8. Do you mean it doesn't display in earlier IE versions or I am missing something? (Or something else - I am very new at this.)
The bearing of a child takes nine months, no matter
how many women are assigned.
|
|
|
|
|
hmm.. here[^] it is my IE8... go figure...
|
|
|
|
|
Now I'm really confused. Why are we getting two different pages?
The bearing of a child takes nine months, no matter
how many women are assigned.
|
|
|
|
|
(Been distracted by World Cup final...)
Well, such are the joys of CSS. Come back tables, all is forgiven....
|
|
|
|
|
Never mind, I think I figured it out - off to learn about quirks mode.[^]. This is getting quite interesting.
The bearing of a child takes nine months, no matter
how many women are assigned.
|
|
|
|
|
Actually, my fault here: I hadn;t specified a doctype in my html - add
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
and it works fine in IE8...
..however, I suspect you'll still find you have problems in the imfamous IE6 (and below...), if that worries you. (It was back in those days I last looked at this problem, and quickly realised I was on to a hiding to nothing. I guess things have improved a bit since then...)
|
|
|
|
|
I mix Tables in Divs all the time.
Makes for neat presentation and ease of use.
Bollocks to the CSS Nazis who say it is wrong, If it works, it is right.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
|
|
|
|
|
With IE, using tables (particularly large wrapping layout tables) can cause an apparent delay with each page load (as IE doesn't render a table until it hits the close tag).
If you can live with it, then there's no reason why not in my book.
|
|
|
|
|
Hi
I have converted the whole file content to base64 binary stream using the below java script code.
After converting I persisted into the database column.
fileNode.dataType = "bin.base64";
// open stream object and read source file
var adoStream = new ActiveXObject("ADODB.Stream");
if (adoStream.State != 1)
{
adoStream.Type = 1; // 1=adTypeBinary
adoStream.Open();
adoStream.LoadFromFile(strFileName);
}
I can also retrieve the same base64 content to client side.
Now I want to generate the same file using the base64 content.
Can anyone tell me now how to convert the base64 to original file format using java script.
|
|
|
|
|
Presumably you can start with something like this[^]?
If not then I think we'll need more information.
|
|
|
|
|
I was watching this SharePoint 2010 video and the guy mentioned that SP2010 uses a lot of AJAX to prevent a full postback. I've always thought AJAX involved the whole postback cycle only, the client browser discards the rest and renders only the control that sent the postback?
Please enlighten me, thanks.
----------------------------------------------------------
Lorem ipsum dolor sit amet.
|
|
|
|