uzma ali

Ranch Hand
+ Follow
since Jun 22, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by uzma ali

I implemented in a very different way and wants your opinion.

I searched the data base with the first letter of the name or location.
For example in case of Fred or Fredie the database searchs all that starts with F and brings all records.

What you guys say about that?

Uzma
When I read you post I worked on the code and came up with this
It's not a fancy one but it does help and one can improve upon it


Please comment
I can only give you the answer to your first part
YOu might have known about Facade Pattren. Create a class which implements all the methods from DBMain in the the Facade at least give a body and then you can have differnt classes for detailed implementation.
I am doing B&S and owner field contains nothing or it should have a string with a default value of null.

If I check it with null or "" then it's not

I need this value so that to say if the record is available for booking.

Please help and give me suggestion

Thanks

Uzma
Thanks Ernest Friedman-Hill for your reply.
Some of the questions are basic but while you are programming sometimes you are stuck in a very basic step and nothing wrong in asking. But other questions which are SCJD questions I asked and to which I could not get appropriate answer.
Also may be many people are asking the same thing but there are different angles everyone is looking at and at the same time different people respond it differently so it even clarifies more.
so someway we all should encourage those answer more and more questions to keep the forum alive.
uzma
But don't you think so that the organizers should do somethig to make this forum active.

Again no offence
uzma
Guys

I have seen that this forum is quite slow in getting the proper help.
While I was doing SCJP, those guys are very helpful but that's not the case here.

sorry if anybody got offended

uzma
if I use arrayList how can I take the rec No to the next step in the GUI where we need the rec No for the book.

Please help as I am really stuck and no way to find help

uzma
I am listing the code below

My questions are

1) if my hashmap(contractorRecords) gets 14 records there are more calls to getRowCount. Why is that happening. when I move up and down the scroll bar then values change in the console.

2)I am using hashmap in which the key are the record Numbers. I have no idea how to pass the keys to the main file so that it can be selected my the client but at the same time should not be displayed in the table.

If you read through the old post some of them left these functions blank and some have given functionality as they thought nothing wrong in doing extra work. Ones who left blank have a reason as not required.

I hope it helps

Uzma
But there are only 14 records are fetched for the search I do so how this 10 row come in the picture.

Can you explain and also can you help me in second question how to transfer the recNo with the record values to Main file while I am using hashmap

thanks

Uzma
Hi

I am really stuck on this point.


On console I could see that my row value increments to 9 starting from 0. I have no idea why?
I would need record number along with the values. I tried many things , nothing seem working for me. Pleae help and guide me how to pass recNo which is contained in contractorRecords.
Any help is appreciated

Thanks

Uzma
thanks

Didu have a separate method of find in your new interface. Let me know what your additional interface is doing.

Also if you need help in findByCriteria(), let me know

Thanks

uzma
I did the find by Criteria. As name and the location are the fields to put the search on , so there are number of records returned and name and location are repeated in many records.

Now update starategy.

The user clicks one of the record which he wants , I'll store all the fields in an array and find the record by find method(not findByCriteria as this time we have more fields)

My question is here can I add another find method in Data.java, which is not mentioned in the DBAccess inteface, I think we can but just watned to be sure and want your opinion.

After finding the record I'll lock the record and do the find again and match with the old values to be sure that the record has not been changed.

The lock method will generate the Lock cookie with which I'll call the update method. What this lock cookie is for by the way. Are we suppose to store it somewhere other than calling the update(). Please comment

When the record is matched then I do the update or book it with CustomerID.

the last method would be to unlock.

Please suggest about my understanding

Any advice is appreciated

thanks

Uzma