Prog Error

Prog Error

<%@ page language="java" import="java.sql.*" %>
<%@ page import="java.lang.String.*" %>
<%
Connection con=null;
//ResultSet state=null;
Statement stmt=null;
String st;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:Advdsn");
stmt=con.createStatement();

}
catch(SQLException se)
{
out.println("Database Error:"+se.getMessage());
}
catch(Exception e)
{
e.toString();
}

%>
<HTML>
<HEAD>
<TITLE> Place Ad </TITLE>
<script type="text/javascript">
function Browse()
{

</script>
</HEAD>

<BODY BGCOLOR="lightblue">
<marquee behavior="alternate" scrollamount=5 scrolldelay=10><h1><font size=4 face="Stroustroup" color="#993355">Advertisement Management System</h1></font></marquee><br>
<p align=center><b> <font color="669933" size=4>Create Ad </font></b></p><br>
<form method=post action="http://localhost:8080/ProjectAd/Preview">
State: <select name="State" size=1>
<%
ResultSet state=stmt.executeQuery("Select * from PlaceAd");

while(state.next())
{
%>
<option>
<% out.println(state.getString(1)); %>
</option>
<%}%>
</select><br>

City: <select name="City" size=1>
<%
ResultSet city=stmt.executeQuery("Select * from PlaceAd");
while(city.next())
{
%>
<option>
<% out.println(city.getString("City")); %>
</option>
<%}%>
</select><br>
Main Category: <select name="mainCat" size=1>
<%
ResultSet mainC=stmt.executeQuery("Select * from PlaceAd");
while(mainC.next())
{
%>
<option>
<% out.println(mainC.getString("Main Category")); %>
</option>
<%}%>
</select><br>
Sub Category:<select name="subCat" size=1>
<%
ResultSet subC=stmt.executeQuery("Select * from PlaceAd");
while(subC.next())
{
%>
<option>
<% out.println(subC.getString("Sub Category")); %>
</option>
<%}%>
</select><br>
Title: <input type=text name="Title" size=25><br>

<p>Draft Your Ad Here:<textarea name="DraftAd" rows=3 cols=25 size=25 id="DraftAd"></textarea>
<%
for(int i=0;i<=DraftAd.length;i++)
out.println(i);
%>
Count:<input type=text name="count" size=5 id="count" disabled="disabled" value="<%=i%>"></p>


<p>Image:<input type=text name="Image1" size=25>
<input type=submit name=SubmitBrowse value="Browse" onSubmitBrowse="return Browse();" ></p>
Add another Image<br>
Email:<input type=text name="Email" size=25><br>
Phone No:<input type=text name="PhoneNo" size=25><br>
Select Newspaper:<select name="NewsPaper" size=1>
<%
ResultSet newspaper=stmt.executeQuery("Select * from PlaceAd");
while(newspaper.next())
{
%>
<option>
<% out.println(newspaper.getString("NewsPaper")); %>
</option>
<%}%>
</select><br>
Select Your Date:<select name="Date" size=1>
<%
for (int date=1;date<=31;date++)
{
%>
<option>
<%
out.println(--- Please Select ---);
out.println(date);
%>
</option>
<%}%>
</select>Month:<select name="Month" size=1>
<%
for (int month=1;month<=12;month++)
{
%>
<option>
<%
out.println(--- Please Select ---);
out.pritnln(month);
%>
</option>
<%}%>
</select>Year:<select name="Year" size=1>
<%
for (int year=1960;year<=2010;year++)
{
%>
<option>
<%
out.println(--- Please Select ---);
out.println(year);
%>
</option>
<%}%>
</select><br>
Select Number of Days:<input type=text name="Days" size=5><br>
<p>Confirm:<input type=checkbox name=confirm ><input type=submit name=SubmitSave value=Save><br>
<p><input type=submit name=submit value=Submit><br>

</form>
</BODY>
</HTML>


Database fields are:
State
City
Main Category
Sub category
Title
DraftAd
Count
Image
Email
PhoneNo
Newspaper and edition
Date
Month
Year
no of .Days

Here in Main Ctegory eg: Matrimonial is selected
in sub category user can select groom
in no.od days says for how many days you ad should get displayed. if 2 then it will get displayed for 2 dayeform date of ad.

In draft ad when characters are typed then it shold get converted in words and should get displayed in count box.

In image ,there is a browse button if user clicks it he should get a folder of images from where it can select it and it should get saved in database when clicked on save button and should get displayed on next page when clicked on submit.

View Answers









Related Tutorials/Questions & Answers:
Prog Error - JSP-Servlet
Prog Error   Place Ad function Browse() { Advertisement Management System Create Ad State: City: Main Category: Sub Category: Title
ModuleNotFoundError: No module named 'prog'
is throwing following error: ModuleNotFoundError: No module named 'prog' How to remove the ModuleNotFoundError: No module named 'prog' error..., ModuleNotFoundError: No module named 'prog' error will be solved. Thanks
Advertisements
ModuleNotFoundError: No module named 'func_prog'
_prog' error? Thanks   Hi, In your python environment you... python library, ModuleNotFoundError: No module named 'func_prog' error...ModuleNotFoundError: No module named 'func_prog'  Hi, My Python
NEED A PROG
NEED A PROG   whats the program to add,delete, display elements of an object using collecions. without using linked list   Hi Friend, Try the following code: import java.util.*; class CollectionExample { public
turbo C prog.
turbo C prog.  Is is possible print ASCII value of a alphabets using turbo C prog
ModuleNotFoundError: No module named 'prog-edu-assistant-tools'
the ModuleNotFoundError: No module named 'prog-edu-assistant-tools' error? Thanks  ...ModuleNotFoundError: No module named 'prog-edu-assistant-tools'  Hi, My Python program is throwing following error: ModuleNotFoundError
ModuleNotFoundError: No module named 'prog_lang_detector'
named 'prog_lang_detector' error? Thanks   Hi, In your..., ModuleNotFoundError: No module named 'prog_lang_detector' error will be solved...ModuleNotFoundError: No module named 'prog_lang_detector'  Hi, My
resolution for prog
error as Current.java:6: cannot find symbol symbol : method CurrentThread...(); ^ 1 error pls tell me the reolution
java prog que
java prog que  create a class that returns the reverse of each word in the given string. For example if we give "who are u?" as input, it should return "ohw era u
Java entry prog.
Java entry prog.  Dear sir I will enter the dept code, dept name and insert into dept_mast and save. Pl. Dept_mast Dept_code Char(2...){ System.out.println("Error! Your dept code is not valid
question "writing prog"
question "writing prog"  Hello I want helping for this question, please Write a program that reads some friendsā?? names, stores them in an array, and then prints out on the screen all friends who start by a particular letter
please help me in these prog
please help me in these prog   create 2 jdbc programs including awt create 2 jdbc programs including swing create 2 jdbc programs including command line argument create 2 jdbc programs including io class 4 jdbc prog using
Solution to C prog
Solution to C prog   Hi, Pls any body help, why the following prog crashing while running. #include<stdio.h> #include<conio.h> int main(){ int n,*fact(int *n); printf("Enter the number:"); scanf
servlet prog - Java Interview Questions
servlet prog  how to forward or redirect the client request from servlet to jsp? how a thread or request pass from one servlet prog to one jsp prog? is it possible of communicating from servlet to jsp prog? please explain briefly
PKG_PROG_PKG_CONFIG: command not found
PKG_PROG_PKG_CONFIG: command not found  Hi, How to solve PKGPROGPKG_CONFIG: command not found error This error is coming while executing the configure script. Thanks
PKG_PROG_PKG_CONFIG: command not found
PKG_PROG_PKG_CONFIG: command not found  Hi, How to solve PKGPROGPKG_CONFIG: command not found error This error is coming while executing the configure script. Thanks
PKG_PROG_PKG_CONFIG: command not found
PKG_PROG_PKG_CONFIG: command not found  Hi, How to solve PKGPROGPKG_CONFIG: command not found error This error is coming while executing the configure script. Thanks
PKG_PROG_PKG_CONFIG: command not found
PKG_PROG_PKG_CONFIG: command not found  Hi, How to solve PKGPROGPKG_CONFIG: command not found error This error is coming while executing the configure script. Thanks
PKG_PROG_PKG_CONFIG: command not found
PKG_PROG_PKG_CONFIG: command not found  Hi, How to solve PKGPROGPKG_CONFIG: command not found error This error is coming while executing the configure script. Thanks
make a prog for this query
make a prog for this query  write a program implementing interface for personal data n salary details. interface must contain abstract methods. steps for the program are 1) store the data in text file 2)display salary when emp id
turbo C prog.
turbo C prog.  Is it possible to print ASCII value A to Z with out using scan ? also give to simple example of binary search ...   #include<stdio.h> #include<conio.h> void main() { for(char c='A';c<
turbo C prog. Q3
turbo C prog. Q3  What is the difference between if and ladder if ? Describe ladder if with example. What is the purpose of the parameter passing ? please Describe with example.   if statement is used to write
(ForPro) turbo C prog. Q4
(ForPro) turbo C prog. Q4  I need to learn some easy foxpro program.. for example sum,interchange, loop etc
error
error  while iam compiling iam getting expected error
Error-
Error-   Hello, I would like to know about XSD file. I try to print XML file but I am getting error SAXException-- says Content is not allowed in prolog. Please help me
error
error  i have 404 error in my program plz tell me yhe solution about
error
error  i have 404 error in my program plz tell me yhe solution about
error
/ServletUserEnquiryForm.shtml getting an error given below SQLException caught: [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error please suggest
Error
Error  I have created ajax with php for state and city. When I change state then city will not come in dropdown list and it give me error as 'Unknown Runtime Error'. This error come only in IE browser, but in other brower
error
error  java.lang.unsupportedclassversionerror:bad major version at offset 6 how to solve this????   Hi, Please check the version of framework used and also the JDK version.ADS_TO_REPLACE_1 This type error also comes
error
error
error
error  When I deploye the example I have this message cannot Deploy HelloWorld Deployment Error for module: HelloWorld: Error occurred during deployment: Exception while deploying the app [HelloWorld
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern = /^\d{3,5
error
"+it); } } this is my program i am getting an error saying cannot find symbol class stringADS
error
error  whats the error.............. import java.util.Scanner; public class g { public static void main(String[] args) { Scanner s=new Scanner(System.in); int d,x,y; System.out.println("Enter the first number
Spring Hello World prog - Spring
Spring Hello World prog  I used running the helloworld prog code mentioned in http://www.vaannila.com/spring/spring-mvc-tutorial-1.html I'm getting null pointer exception. as shown below. I added all the jars and my
java prog
java prog
java prog
prog. using radio buttons for simple calculator
prog. using radio buttons for simple calculator  import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; class Calculator extends JFrame { private final Font BIGGER_FONT = new Font
prog. using radio buttons for simple calculator
prog. using radio buttons for simple calculator  import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; class Calculator extends JFrame { private final Font BIGGER_FONT = new Font
error
error
error

Ads