Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8899663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:54:45+00:00 2026-06-15T00:54:45+00:00

I´m trying to insert a record to table, which i choose in html form…Can

  • 0

I´m trying to insert a record to table, which i choose in html form…Can I use something like this in jsp?

String queryString = "INSERT INTO ? (login,password,full_name,ulevel) VALUES (?, ?, ?, ?)";
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T00:54:46+00:00Added an answer on June 15, 2026 at 12:54 am

    Main Answer
    If you want to use JDBC, which I agree may be what it is, you may try this:

    <% String myquery = "SELECT * FROM EMPLOYEES WHERE DEPARTMENT = ?"; %>
    <% PreparedStatement mystatement = connection.prepareStatement(myquery); %>
    <% mystatement.setString(1, request.getParameter("myURLparam")); %>
    <% ResultSet results= mystatement.execute(); %>
    

    You can refer to this link on how to use it. Java Oracle got better examples: http://docs.oracle.com/javase/tutorial/jdbc/basics/prepared.html

    Previous Answer:
    Use String format

    Java example:

    String fs;
    fs = String.format("The value of the float " +
                   "variable is %f, while " +
                   "the value of the " + 
                   "integer variable is %d, " +
                   " and the string is %s",
                   floatVar, intVar, stringVar);
    

    http://docs.oracle.com/javase/tutorial/java/data/strings.html – Check bottom section.

    Apply it for JSP.

    <html>
        <head>
          <title>Concatenate String in JSP</title>
        </head>
        <body bgcolor="#fff">
            <% String tableName = "Table"; %>
            <% String login = "login"; %>
            <% String password = "myPassword"; %>
            <% String fullName = "Full Name"; %>
            <% String ulevel = "Level 1"; %>
            <% String msg = "INSERT INTO " + tableName + " (login,password,full_name,ulevel) VALUES ("+ login + ", "+password+","+fullName+", "+ulevel+")"; %>
            <% out.println(msg); %>
        </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'am trying to insert record into db2 table and getting a result with response.write.
I am trying to insert a record into a table using Linq but get
I'm trying to insert a new record into a table 'order'. Here is the
I'm trying to insert some data into a table from a csv document which
I am trying to insert 15530 record in a certain table using SQLite3 shell
I am trying to do record inserts on a table where the Primary Key
I'm trying to insert a record into the database but it is giving me
I'm trying to insert a record (on LINQ to SQL) to the database. So
I am trying to insert a record into my database. here is my php
I am experiencing a very frustrating issue when trying to insert a new record

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.