8 Replies - 2163 Views - Last Post: 14 September 2009 - 05:27 PM Rate Topic: -----

#1 fschino  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 26-August 09

How to search ms access data using java

Post icon  Posted 13 September 2009 - 05:50 PM

i know this code work. but i want to display it in a text box.


if(ae.getActionCommand()=="Search")
			{
				stmt.executeUpdate("SELECT FROM prog11 WHERE id=" + txtid.getText() + "");			
				dbClose();
				dbOpen();
			}	





please help

This post has been edited by fschino: 13 September 2009 - 07:54 PM

Is This A Good Question/Topic? 0
  • +

Replies To: How to search ms access data using java

#2 fschino  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 26-August 09

Re: How to search ms access data using java

Posted 13 September 2009 - 07:56 PM

i know this code work. but i want to display it in a text box.


if(ae.getActionCommand()=="Search")
			{
				stmt.executeUpdate("SELECT FROM prog11 WHERE id=" + txtid.getText() + "");			
				dbClose();
				dbOpen();
			}	





please help
Was This Post Helpful? 0
  • +
  • -

#3 mark.bottomley  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 176
  • View blog
  • Posts: 990
  • Joined: 22-April 09

Re: How to search ms access data using java

Posted 13 September 2009 - 08:10 PM

need to read closer - this is the Visual Basic .Net group, not Java - I'm sure a moderator will move your question soon.
Was This Post Helpful? 0
  • +
  • -

#4 syfran  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 83
  • View blog
  • Posts: 1,103
  • Joined: 12-July 09

Re: How to search ms access data using java

Posted 13 September 2009 - 09:08 PM

Whats your problem? Do you need help creating a text box?

More of your code would really help.
Was This Post Helpful? 0
  • +
  • -

#5 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1638
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: How to search ms access data using java

Posted 13 September 2009 - 09:24 PM

Moved to Java :)
Was This Post Helpful? 0
  • +
  • -

#6 syfran  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 83
  • View blog
  • Posts: 1,103
  • Joined: 12-July 09

Re: How to search ms access data using java

Posted 13 September 2009 - 09:48 PM

Also a double post, there is already one here in the java forums.
Was This Post Helpful? 0
  • +
  • -

#7 fschino  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 26-August 09

Re: How to search ms access data using java

Posted 14 September 2009 - 07:22 AM

View Postsyfran, on 13 Sep, 2009 - 08:08 PM, said:

Whats your problem? Do you need help creating a text box?

More of your code would really help.



hi there. i know how to create a textbox but my problem is how to make it as it value. because im making a log in form in java. so i nid to make a example. for example:

if txtUsername.getTxt()="data from data base"
username accepte!
else
does not exist!


hope u understand. i really nid your help.Thanks
Was This Post Helpful? 0
  • +
  • -

#8 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8324
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: How to search ms access data using java

Posted 14 September 2009 - 04:16 PM

It is not a executeUpdate() but an executeQuery() which returns a ResultSet into which you use the next() method to get every row
Was This Post Helpful? 0
  • +
  • -

#9 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8324
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: How to search ms access data using java

Posted 14 September 2009 - 05:27 PM

Duplicated topics merged
Please avoid duplicated posts :angry:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1