Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

selecting rows from a table

 
Citra Dil
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have a table 'Address' with fields: name varchar(30) ,surname varchar(30),email varchar(30),phone varchar(30)
I am writing a program to select all records from the table.Can you please tell me what is going wrong

 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how about you tell us what is happening to make you think something is wrong. then maybe we can help you work out how to fix it.
 
Citra Dil
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think when using getString for varchar field, I am going wrong.
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code above is missing the result set returned from execute Query?

getString is the exact method to call on a result set for a varchar
 
Citra Dil
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.I have modified the program with Result set.but no help.Please have a look.
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you need to find examples of how to work with a result set, as it is designed to contain more than one row (think about it, a design that could only return 1 row isn't much use).
I'm not going to type it again as there are dozens of examples out there already.

 
Citra Dil
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Wendy.It got worked with
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic