It's not a secret anymore!
The moose likes Beginning Java and the fly likes Delete Records form Database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Delete Records form Database" Watch "Delete Records form Database" New topic

Delete Records form Database

Sander Silva

Joined: May 15, 2011
Posts: 28
Hi all!

I need to delete all records form my (MS Access) database
when I give a particular name (String) of a record.
When I click the button all records related to particular name should be deleted.
There's something wrong in my code. please help

please help,
Zandis Murāns
Ranch Hand

Joined: Aug 18, 2009
Posts: 174

So what message comes with exception?
Sander Silva

Joined: May 15, 2011
Posts: 28
Thank you for quick reply,

here's the error

cannot find symbol
symbol: method getText(java.lang.String)
location: class java.lang.String
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

Well, it's true. The String class doesn't have a static getText() method.

However I have no idea what you meant to use that nonexistent getText() method for, so I can't make any suggestions about what you should replace it by. Could you explain what it was supposed to do?
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15092

This line is wrong:

You are trying to call the method getText on the String class. But class String does not have such a method. You probably meant this:

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
I agree. Here's the link:
subject: Delete Records form Database
It's not a secret anymore!