Click here to Skip to main content
15,913,610 members

Comments by Atul Rokade (Top 200 by date)

Atul Rokade 16-Apr-18 7:34am View    
my jsp code :


<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page


<%

String employee_id=request.getParameter("txtemployeeid");
String get_project1=request.getParameter("ingr_project");
String get_header=request.getParameter("ingr_header");
String get_department=request.getParameter("ingr_department");
String get_description=request.getParameter("ingr_description");

HttpSession session1=request.getSession(true);
session1.setAttribute("txtemployeeid", employee_id);
%>

<%
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con=DriverManager.getConnection("jdbc:oracle:thin:@177.18.114.213:1821:godb","xe","Spacess");

try
{
int count=0;
//String btnsubmit=Integer.parseInt(request.getParameter("btnSubmit"));
String btnsubmit=request.getParameter("btnSubmit");
if(btnsubmit!=null)
{
count=Integer.parseInt(btnsubmit.trim());


for(int i=0;i< count; i++)
{


PreparedStatement ps=con.prepareStatement("insert into Employee_task values(?,?,?,?,?)");
ps.setString(1, employee_id);
ps.setString(2, get_project1);
ps.setString(3, get_header);
ps.setString(4, get_department);
ps.setString(5, get_description);
ps.executeUpdate();
}



}
}
catch(Exception ex)
{
ex.printStackTrace();
}

%>

Atul Rokade 16-Feb-17 12:28pm View    
Sorry im waste your precious time i will check and post as answer as soon as sorry once again
Atul Rokade 16-Feb-17 12:12pm View    
for testing purpose i done but previously code was executed as expect but now not understand where i done mistake
Atul Rokade 24-Oct-16 15:15pm View    
ok i solve the problem thank you for your suggestion actually i set datatype number for contactNo thats why overflow error was came, i change to number to memo and its woking fine
Atul Rokade 24-Oct-16 14:39pm View    
System.Data.OleDb.OleDbException was unhandled
Message="Overflow"
Source="Microsoft Office Access Database Engine"
ErrorCode=-2147217833
StackTrace:
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
at Medical.Form3.button1_Click(Object sender, EventArgs e) in E:\Project backups\Medical\Medical\Medical\Form3.cs:line 676
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Medical.Program.Main() in E:\Project backups\Medical\Medical\Medical\Program.cs:line 18
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: