• Post Reply Bookmark Topic Watch Topic
  • New Topic

help for Search form in JCreator  RSS feed

 
Wie Jhun Dy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im currently writing a Program using JCretor, and i don't know how to add a Scan button and to make it work.. any body knows please help me.. im on hand with a inventory system for thesis and i need Scan button.. thanks in advance and God Bless...

heres the current code ive written:
for Search Form but it doesnt display the result.........



 
Campbell Ritchie
Marshal
Posts: 56525
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

I have added code tags, which you should always use, to your code, and doesn't it look better. Unfortunately those SQL queries make the lines too long to read easily, so I have tried to break them correctly. Please do not try to save screen space by squashing methods into one line. Please use correct naming conventions for your classes, and avoid “Hungarian Notation”, which makes your variable names harder to read.

I do not think that code will compile as it is written, because you have unbalanced quote marks "". I presume you know about characters and escapes.
I can see other potential logic errors, including using the == operator applied to Strings. Also, you are trying to do too many things in one class. You should have a class with methods to scan the text. You should have a class with methods to do the SQL queries. And you should have a class which shows the display.
That looks like code where you have tried to write too much before finding out it doesn't work. I think you need to write a class with methods which scan text passed to them, probably from the command line. Then you can see how it is done and later, add the scanning facility to your other classes.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!