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 7635773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:30:39+00:00 2026-05-31T07:30:39+00:00

For an assignment I am developing an application that need to perform insertions in

  • 0

For an assignment I am developing an application that need to perform insertions in a MySQL database.
I am using JDBC but the hosting services I have don’t provide support for JDBC.

What can I do? Is this method too old? Can you suggest me any alternative to basically insert from a Java application into a remote MySQL database?

EDIT: enter image description here

I wonder why people spend time editing old questions in a useless way… do you really care if I write mysql or MySQL? Does not make sense to me, you could spend your time actually answering the question…

  • 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-05-31T07:30:41+00:00Added an answer on May 31, 2026 at 7:30 am

    No, it’s not old, in order to connect to a database using java you need to have JDBC! start a simple JSP proof-of-concept in order to do that and probably you’ll see it working. I don’t think there’s a host without JDBC support. Anyways, here is a really simple / insecure / old fashioned JDBC example:

    <%@page import="java.sql.*"%>
    <%
    try {
    String name=request.getParameter("name");
    String address=request.getParameter("address");
    Class.forName("com.mysql.jdbc.Driver");
               Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/yourdb", youruser, yourpassword);
               Statement st=cn.createStatement();
               int i = st.executeUpdate("insert into user(name,address) values('"+name+"','"+address+"')");
               out.println("Data is inserted successfully");
               st.close();
               cn.close();
    } catch (Exception e) {
       out.println(e.getMessage());
    }
    %>
    

    EDIT: Please not that this is proof-of-concept, this code is vulnerable to SQL injection and/or needs to be improved.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For a database assignment I have to model a system for a school. Part
I have an assignment in a language-independent class, and part of it is using
I have an assignment to create a GUI using MATLAB GUIDE and am having
I have an assignment at university, and I have started developing for this in
Hi I'm developing a winform application using C# and the entity framework (linq to
I am developing an application for iPhone on Snow Leopard with Xcode 3.1 that
Here is the problem. i am developing a windows forms application in c# that
I am developing an Mac Desktop application. I have the problem related to Spaces
I am developing a reservation system, and i have a function that save the
I am developing a rails application in which I have two models User and

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.