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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:59:46+00:00 2026-06-06T10:59:46+00:00

This the file I am trying to store in the database. I want to

  • 0

This the file I am trying to store in the database. I want to get the title and comments stored. I do get it in, but it stores only the first line.
Please help, not really good with databases.

title : The Descent Part 2 comment : badbaz83 : No it wasn't as good as the first one, but a hell of a lot better than I first feared. Worth a watch, but don't expect it to stand up to the first film.

title : Supernatural comment : MissAyla : I loved this episode. :) I'm thoroughly enjoying the new style, just like the original episodes.

title : Soccer Mom comment : chantellel93 : it's only 10 min so if u smoke 1 its worth the laugh 2/5. xx
  • 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-06T10:59:48+00:00Added an answer on June 6, 2026 at 10:59 am

    You first need to split line into Title and Comment and assign an id. Try this (note it is case sensitive):

    String s = line.toString();
    Title = s.substring(8, s.indexOf("comment :")).trim();
    Comment = s.substring(s.indexOf("comment :") + 10, s.length()).trim();
    

    Then let us know where you get to.

    I’m assuming you are trying to do this database insert (SQLFiddle ).
    To automatically assign an id you could set id as your auto_increment primary key (as per my example). You could then could make use of executeUpdate(String sql, int autoGeneratedKeys).

    I’ll try and update my answer when you supply more details of the problem.

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

Sidebar

Related Questions

I am trying to loop through this external JSON file(locally stored), but I cannot
I'm trying to download http://www.downway1.com/dota/eng/DotA%20Allstars%20v6.67.w3x this file. But it's not able to download. It's
My App has a database file in its NSBundle. I want to get update
I'm trying to read and store an RSS feed in my database using this
I'm trying to store a file in an SQL Server database and am using ASP.NET
I am trying to read this file I created as sample made up from
Taking this file as an example, I'm trying to read the data in a
I am posting a load of information to this file, and then trying to
I am trying to read this .csv file and here is an example of
I am trying to split this css file into different blocks. Everything matching /*@-

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.