dickersonka 104 Veteran Poster

just by chance, try moving the bracket after the while loop first comment, to be on the same line as the while statement

also did you initialize your array thePlayers?
trying taking everything out, and in the while loop just do a println on dataFile.nextLine()

think there might be something with player in there possibly affecting it

dickersonka 104 Veteran Poster

and is an exception caught or no?

dickersonka 104 Veteran Poster

its not open from another application is it?

also wrap a try catch around and check and make sure it is accessing it properly

dickersonka 104 Veteran Poster

i agree, would also add clientpets to bookings / volunteers

dickersonka 104 Veteran Poster

Agree with jbennett. A lot of the time when you see intermittent periods where the system will be on then just shut off, means the cpu is overheating. Especially, if you hear everything spin up.

dickersonka 104 Veteran Poster

I will help, not do assignments, what specific pieces are you having trouble with?

Also what is background and skills in the volunteers table?
One more, where did the relationships table go? ClientChild table means only children and not other relationships? Client table has a next of kin column, what is this?

dickersonka 104 Veteran Poster

you can just use this post here, so everyone can benefit from it and be able to offer you advice

dickersonka 104 Veteran Poster

You should have it, but here's the link

http://java.sun.com/products/java-media/sound/index.jsp

dickersonka 104 Veteran Poster

NewUserId will be PurchaseOrderId

make sure you have this in the stored procedure as well, like we said before

@PurchaseOrderId int OUTPUT

also make sure if you modified the code it is cmd not cmdl, unless you changed the name

dickersonka 104 Veteran Poster

sorry, this way does use the way we had first with
OUTPUT and select @PurchaseOrderID = @@IDENTITY

so change it back to that to follow that example, no more changes now :-)

dickersonka 104 Veteran Poster

yes that is what i mean

it was just code, but anyways
here's a better link

http://www.dotnetjunkies.com/WebLog/skiff/archive/2005/02/12/54047.aspx

dickersonka 104 Veteran Poster

Here's a link

http://blogs.msdn.com/vsdata/archive/2006/08/21/711310.aspx

you can change your stored procedure, by removing the "OUT" parameter, and instead of
select @PurchaseOrderId = @@IDENTITY

you just use return @@IDENTITY

dickersonka 104 Veteran Poster

the problem is that when you execute the first query, it is returning your purchaseorderid, which links the purchaseorderdetails to it

you need to pass this in as a parameter from code side

dickersonka 104 Veteran Poster

And just as good practice, a database is there for the organization, it doesn't need to be in sequential order.

It may look prettier to you if it is, but just add an order by user_id or whatever it may be to your query, trying to update id's all over the place is a pain in the a@@ if you don't have the correct set of foreign keys in place

dickersonka 104 Veteran Poster

i don't have a clear idea of what you are wanting

the message_from field has a 3 and it needs to be a 104?

dickersonka 104 Veteran Poster

here's a tip

use while loops when you don't know the number of iterations (you never know when the user will type "no")

use a for loop for a known size
(for each hour in the day, have 5 records)

dickersonka 104 Veteran Poster

Sure thing, always show your effort and we will be more than willing to help

dickersonka 104 Veteran Poster

purchaseorderdetails
PURCHASE_ORDER_DETAILS_ID
PURCHASE_ORDER_ID
ITEM_ID
ITEM_AMOUNT

create procedure sp_AddPurchaseOrderDetails
(
   @PurchaseOrderId int,
   @ItemId int,
   @ItemAmount decimal(10,2),
   @PurchaseOrderDetailsId int OUTPUT
)
as

insert into PurchaseOrderDetails (PURCHASE_ORDER_ID, ITEM_ID, ITEM_AMOUNT) values (@PurchaseOrderId, @ItemId, @ItemAmount)

select @PurchaseOrderDetailsId = @@IDENTITY
dickersonka 104 Veteran Poster

Ok, so you are meaning its correct then?

dickersonka 104 Veteran Poster

close, you need to make the loop go outside of all that, also please place code in code tags

System.out.println(" Do you want to enter information ?");
String choose = input.nextLine();

while(choose.equals("yes")) {
System.out.println(" What is your name ? ");
String name = input.nextLine();

System.out.println(" What is your age ?");
String age = input.nextLine();

System.out.println(" What is your ssn ?");
String ssn = input.nextLine();

System.out.println(" What is your address ?");
String address = input.nextLine();

System.out.println(" Do you wish to make another entry ?");
choose = input.nextLine();
}
dickersonka 104 Veteran Poster

ahhh, now with the document i see how volunteers are related


volunteers
VOLUNTEER_ID
NAME
TELEPHONE
ADDRESS

volunteerservicesprovided
VOLUNTEER_SERVICE_ID (optional)
VOLUNTEER_ID
SERVICE_CODE

change booking records to this

bookingrecords
CLIENT_ID
DATE
REQUIRED_HOURS
REQUIRED_SERVICE_CODE
VOLUNTEER_ID

this way, if a volunteer ever changes his service offered, you still have record of which volunteer did the service

dickersonka 104 Veteran Poster

then this table structure should work for you

dickersonka 104 Veteran Poster

top

dickersonka 104 Veteran Poster

I don't necessarily know where to start for a complete OS, but I have made drivers before.

You can find a forum, and articles and what not at
www.osronline.com

This is a primarily windows site btw, but many drivers at least share a lot of similarities.

dickersonka 104 Veteran Poster

sure, you had a good start on the first one
we'll do the purchaseorder

create procedure sp_AddPurchaseOrder
(
   @POInputDate smalldatetime,
   @PurchaseOrderId int OUTPUT
)
as

insert into PurchaseOrder (PO_DATE) values (@POInputDate)

select @PurchaseOrderId = @@IDENTITY

then you will use the same concept for creating purchaseorderdetails, except you will pass in the purchaseorderid as a parameter

(btw i just used the date column, and not client_id like we talked about before)

dickersonka 104 Veteran Poster

Although you aren't passing arrays, you should return the id of the purchase order to your code.

Then call a stored procedure for sp_AddPurchaseOrderDetails for each item you have, 1 item 1 call, 3 items 3 calls

dickersonka 104 Veteran Poster

the problem looks to be this inside of stop_sub

commandString = fileScan.next ();

there is no command with it, therfore you are reading "output" inside of the stop_sub section

dickersonka 104 Veteran Poster

I'll give you a place to start

The problem you are running into is with indexing urls that are "urlrewrite"

This isn't specific to horse racing, its widely used, but theres a place to start

dickersonka 104 Veteran Poster

lol your guess is correct

either its not installed, or you need to add it as a reference or classpath or whatnot

dickersonka 104 Veteran Poster

you normally wouldn't pass arrays to the stored procedure

for each insert you should make the call to insert purchaseorderdetails, ie 5 items 5 insert calls

passing arrays to a stored procedure i wouldn't consider good practice, the workaround is normally to pass a comma delimited string, but once again i would recommend making the database calls to insert from code side and not rely on it from database side

dickersonka 104 Veteran Poster

very clear question and thanks for showing your effort and what you are having trouble with

i'm not too big on vocabulary, but you want to try to get the database to use third normal form

something like this for your bookingrecords table

bookingrecords
CLIENT_ID
DATE
REQUIRED_HOURS
REQUIRED_SERVICE_CODE

clients
CLIENT_ID
CLIENT_NAME
ADDRESS
CITY
STATE
ZIP (sometimes demographics are in a separate table but we'll keep it simple)
PHONE

clientfamily
CLIENT_FAMILY_ID
CLIENT_ID
CONTACT_NAME
DATE_OF_BIRTH
SEX
RELATIONSHIP_ID

relationship
RELATIONSHIP_ID
RELATIONSHIP_NAME

clientpets
CLIENT_PET_ID
PET_NAME
PET_DESCRIPTION

some of the requirements are a little fuzzy, like who owns the pets, client or a family member

that should be enough to get you started, let me know if you need any clarification

dickersonka 104 Veteran Poster

advice would be you don't want multiple records with the same value of a

for one your database is set to not allow it
for two, you need to uniquely identify this record

might want to rethink the schema

something with a purchaseorder
and purchaseorderdetails

purchaseorder
PURCHASE_ORDER_ID
PO_DATE
CLIENT_ID

purchaseorderdetails
PURCHASE_ORDER_DETAILS_ID
PURCHASE_ORDER_ID
ITEM_ID
ITEM_AMOUNT

this will allow you to have multiple records for a single purchase order

dickersonka 104 Veteran Poster

The scanner constructor takes a string as a source to read from, the string is not a filepath

use this

File file = new File(fName);

Scanner in = new Scanner(file);
dickersonka 104 Veteran Poster

That is the point of the query, you are able to distinguish in the same resultset of who are chaplains and not. You want to use the same column and distinguish code side by checking user_level.

dickersonka 104 Veteran Poster

thats because you are assigning it, the is_chaplain column didn't exist and we had to give it values, the user level column does exist

use this in both queries and you will get your 2 or 3

..... AS f_name,
`tbl_user`.user_level
FROM assignment,
......
dickersonka 104 Veteran Poster

yes, i thought you meant you didn't have a way to distinguish

instead of the is_chaplain, substitute the user_level into the query

dickersonka 104 Veteran Poster

i think we need to add single quotes around the is_chaplain

//readers
0 as 'is_chaplain'

//chaplains
1 as 'is_chaplain'
dickersonka 104 Veteran Poster
SELECT assignment.Id, assignment.Candidate, assignment.`Section`, assignment.Team, assignment.Chaplain, assignment.Reader,  tbl_user.Id,  CONCAT_WS(' ', `tbl_user`.name_pre, `tbl_user`.name_first, `tbl_user`.name_last, `tbl_user`.name_suffix)AS f_name,
0 as is_chaplain
FROM assignment, `tbl_user`
WHERE assignment.Reader= tbl_user.Id 
UNION
SELECT assignment.Id, assignment.Candidate, assignment.`Section`, assignment.Team, assignment.Chaplain, assignment.Reader,  tbl_user.Id,  CONCAT_WS(' ', `tbl_user`.name_pre, `tbl_user`.name_first, `tbl_user`.name_last, `tbl_user`.name_suffix)AS f_name,
1 as is_chaplain
FROM assignment, `tbl_user`
WHERE assignment.Chaplain= tbl_user.Id

this will allow you to have a record set where you could check if the is_chaplain =1 then add to your chaplain list otherwise add to the readers list

dickersonka 104 Veteran Poster

If you need the results separated, then why not issue 2 queries?

Or add an additional column to the rows for the union,
for readers 0 as IS_CHAPLAIN
for chaplains 1 as IS_CHAPLAIN

dickersonka 104 Veteran Poster

i don't get what the difference is in the concat of the chaplain, you are using the same columns

can you show what the concat difference is?

dickersonka 104 Veteran Poster

f_name field is just pre + first + last + suffix

it will use the same formatting for both readers and chaplains

if you want this field different, please explain more clearly with an example of what you need

dickersonka 104 Veteran Poster
WHERE tbl_user.Id= assignment.Reader OR tbl_user.Id = assignment.Chaplain

i think this is what you are looking for with the additional where

dickersonka 104 Veteran Poster

also, just as a formatting rule, try to keep your control names consistent

i.e. tbFirstName

otherwise, it could get a little messy trying to find all your textboxes on a page

dickersonka 104 Veteran Poster

Lol a professor wants you to make it more complex. One of the objectives in programming, is to make a complex task into manageable and logical separated parts, but maybe he just wants to see a little more.

Maybe something more complex, could be added functionality similar to that of amazon where they give suggested items. Based upon what items you have, try to create suggestions for other items, based upon other user's buying habits.

dickersonka 104 Veteran Poster

Agree with stultuske. You need to create something like a "wrapper" class. Lets say for example the jar file will load an employee, but you want to add a check if the employee is still active.

Create a method in your wrapper class to call the jar and load the employee, then add in your check for active into your wrapper class as well.

dickersonka 104 Veteran Poster

A possible solution could be to use events, to pass whatever you needed.

dickersonka 104 Veteran Poster

Asking a question on a forum where you don't seem to read the reponses.

dickersonka 104 Veteran Poster

Agree with narue, mysql is a very good open source database. What are you looking for about your select statement that is different than the rest?

dickersonka 104 Veteran Poster

What are you getting errors, anything?
Post your code and config and we can help.

dickersonka 104 Veteran Poster

aspx is not straight html code, it must be compiled, whether thats at runtime or precompiled

you can right click on your file in visual studio and click view in browser, this will launch the vs asp.net host to allow you to view it, otherwise you need to publish to iis to view it