dickersonka 104 Veteran Poster

lol yeh man, it worked fine, will you post the whole class structure then?

ddanbe commented: inspiring +2
dickersonka 104 Veteran Poster

just to make sure, you have used the full path
C:\folder\Data.xls?

what version of excel?

dickersonka 104 Veteran Poster

hmmm, compiles fine for me

you sure Expression.Valoper is the same class as Valoper?

dickersonka 104 Veteran Poster

for sure your events are registered?

dickersonka 104 Veteran Poster

I think you have an extra TextBox here, the only one you need is the textbox in the toolstrip

for the toolstrip textbox to change as you click on a url, make sure have this event in there

private void webBrowser1_Navigated(object sender,
    WebBrowserNavigatedEventArgs e)
{
    toolStripTextBox1.Text = webBrowser1.Url.ToString();
}
dickersonka 104 Veteran Poster

for one, you don't need to call WorkBookToOpen.ToString(), it already is a string

is workbooktoopen a valid path? and are you calling open first?

dickersonka 104 Veteran Poster

what are you wanting the TextBoxAddress to be?

i thought you were typing in a url and hitting enter

dickersonka 104 Veteran Poster

in that method run your check that i gave you from before

if ((int)e.KeyChar == (int)Keys.Enter) 
{
//not sure what box has your url, but put it here
Navigate(toolStripTextBox1.Text);
}
dickersonka 104 Veteran Poster

capture keypress event from your form

dickersonka 104 Veteran Poster

are you catching the key press event and checking for enter?

if ((int)e.KeyChar == (int)Keys.Enter) 
{
Navigate(toolStripTextBox1.Text);
}
dickersonka 104 Veteran Poster

basically there will be rows, that will be null (its set to 0 in the the if statement), because the rows are columns, if the service_id != 1 then the row will be null

therefore, the max will pull the highest, which will be 1 if the entry is there

think of it like for columns JET GROUND and GLYCOL

1 0 0
0 1 0
0 0 1

the max, allows us to group these three rows and select "1" if the service is enabled, although its in a different row

let me know if i need to explain it a little better

dickersonka 104 Veteran Poster

this should do the trick, the only problem is if you ever add services, you will need to change the query to reflect that

select usr_id_users as USR_ID, airport_id_airport AS AIRPORT_ID,
a.airport_code AS AIRPORT_CODE,
max(if(service_id_service=1, 1, 0)) as JET,
max(if(service_id_service=2, 1, 0)) as GROUND,
max(if(service_id_service=3, 1, 0)) as GLYCOL
FROM userairportservices uas
INNER JOIN airport a
 on a.airport_id = uas.airport_id_airport
-- change this for different users
where usr_id_users = 1 
group by airport_id_airport;
dickersonka 104 Veteran Poster

sure man, will work on it right after i get to work in the morning

...ahhhh, a fresh mind

dickersonka 104 Veteran Poster

thanks, how soon do you need it?

cool if i get back with you in the morning?

dickersonka 104 Veteran Poster

the table schema, if you want you can send a backup if its small enough

dickersonka 104 Veteran Poster

will you post the structure and i get you a query?

dickersonka 104 Veteran Poster

just to be sure this is what you are meaning, here's a similar post

http://www.daniweb.com/forums/post735371-9.html

is this what you want?

dickersonka 104 Veteran Poster

Yeah I want there to be one row per airport and then, inside of that row, I want to list the related services, either as columns or as rows.

you are meaning sql or php?

dickersonka 104 Veteran Poster

why not do the similar thing as before

loop through the results
when the airportcode changes that means you are in a new group

if in same group, loop through the services and check the appropriate box

i'm not really following the part you are having trouble with, unles you are meaning you want rows to columns? meaning one single row per airport with columns of services

dickersonka 104 Veteran Poster

lol oh filch

this is where the dynamic piece would have helped on the saving

i would suggest to possibly alphabetize them, that is unless they are in order by id

to your query add this

order airport.airport asc, service.service asc
dickersonka 104 Veteran Poster

use the same for loop concept, put it at the bottom of the while loop

for(int i=0; i<index; i++)
{
  System.out.println(num[i]);
}
dickersonka 104 Veteran Poster

you are doing a single check with the if loop

do a for

bool contains = false;
for(int i=0; i<index; i++)
{
  if (number == num[i])
{
System.out.println("Value has already been entered.");
contains = true;
} 
}

if(!contains)
{
num[index] = number;
++index;
}
dickersonka 104 Veteran Poster

is the first one in a stored procedure? where you pass @table_name in?

dickersonka 104 Veteran Poster

depends upon the context, a lot of times you will check to see if bytesRead > -1 or sometimes you check for CRLF (carriage return line feed), other times you will pass how many bytes you will be sending and read until all the bytes have been sent

Antenka commented: Thanks againg for goog and quick help! +1
dickersonka 104 Veteran Poster
dickersonka 104 Veteran Poster

i believe its because you have to "tell" the server when you are done sending, since you want the server to send the request back you have to say i'm done, now send the information

dickersonka 104 Veteran Poster

lol it is working and you are asking what is wrong?

what part doesn't work? or you mean why it didn't work before?

dickersonka 104 Veteran Poster

ah hah, forgot to look at the previous post, i've had some trouble, normally not, but sometimes yes, just want to try and eliminate all possibilities

dickersonka 104 Veteran Poster

and also just to make sure you aren't running client and server on the same machine are you?

dickersonka 104 Veteran Poster

lol i've been looking at numbers all day, but yes the array looks good

wow, going the static route, i would suggest any time you have, make it a dynamic page, it will make your life much easier if things ever get changed, rather than trying to remember positions in the array, also it will actually be less code on you, but i know how time contraints go

hope you can knock this out in just a little bit :-)

dickersonka 104 Veteran Poster

sorry to bombard you with links, but here is another server example

http://fragments.turtlemeat.com/javawebserver.php

dickersonka 104 Veteran Poster

sorry don't have time to debug it right now,
are you getting an ioexception in the server from the first trycatch?

dickersonka 104 Veteran Poster

nm, think i was thinking of something else

can you please post the server and client code, at least the guts part where its sending and receiving

dickersonka 104 Veteran Poster

i don't think it will return null, until the socket gets closed

not for sure if this is the terminator, but did you check for "." (period) with crlf?

also check -1

dickersonka 104 Veteran Poster

ahhh i see now, i know you may not like the idea, but just name the checkboxes as groups when you are displaying them, on postback only grab the ones for the selected airport (also for each airport)

<input type="checkbox" name="YVR[]" />
<intput type="checkbox" name="YYC[]" />
filch commented: Great patience and good advice. +1
dickersonka 104 Veteran Poster

you need to either register the event after databinding or set a boolean to check when finished loading


this might help
http://www.vbforums.com/showthread.php?t=207065

dickersonka 104 Veteran Poster

sorry, forgot it was java, here's a sample java tcplistener

http://www.koders.com/java/fid857615100E60AA30093DF6D87C3135D7AE75C4F5.aspx

Antenka commented: Thanks a lot!!!!!!!!!!! +1
dickersonka 104 Veteran Poster

here ya go, just needs slight modification on response and your listening ports

http://www.codeproject.com/KB/IP/tcpclientserver.aspx

dickersonka 104 Veteran Poster

and maybe if i don't understand properly, let me know what services are being inserted that are wrong, what isn't being inserted my above post isn't correct

dickersonka 104 Veteran Poster

i think maybe its a misunderstanding of the table

the table is for services that the user has per airport, which is whats its doing

the services that aren't checked don't go in the table

when trying to find what services a user has for an airport use

select * from userairportservics where user_id = ? and airport_id = ?

then you can loop through the results and see what services the user has at the specific airport, if the service isn't in the list, they don't have the service available

dickersonka 104 Veteran Poster

are you sure are checking if the checkbox is checked before adding it to the insert list?

dickersonka 104 Veteran Poster

try this

Character.isLetter('1');
dickersonka 104 Veteran Poster

it is giving you the highest id in that table, when you do the insert use

select LAST_INSERT_ID();

this will give you the id of that row, not the highest one in the table

dickersonka 104 Veteran Poster

you can do it that way, i would suggest returning a value from a stored procedure like

select LAST_INSERT_ID();
dickersonka 104 Veteran Poster

Well one of the best ways is just as it is here. Join in on the forums, many people will make new posts about up and coming or new methods of doing things.

Along with that conferences or seminars might help. I'm sure we all are on some Microsoft or tech e-mail list, take a second and read them sometimes.

Frequent the websites for the software you use, .net take a look at msdn, java take a look at the java site.

dickersonka 104 Veteran Poster

lol i think a little over complicating, but you have the right concepts down, just one step at a time

here is pseudo-code, my php is a little rusty right now and i'm sure i would mess it up

$user_id = insert user
foreach airport checked
{
   foreach(servicechecked for airport)
{
     insert userairportservice
     $user_id - from above
     $service_id - checkbox
     $airportid - airport from the loop
}
}
dickersonka 104 Veteran Poster

if you use fxcop or code analysis in visual studio there is a rule CA1806 to 'do not ignore method results'
http://msdn.microsoft.com/en-us/library/ms244717(VS.80).aspx

ddanbe commented: Thanks for the help +2
dickersonka 104 Veteran Poster

same lines as i am thinking, don't understand the need for an interface when its not used, and a getter that is void

maybe it is these instructors now days

dickersonka 104 Veteran Poster

if you are calling getArms or getLegs why should that return void? when you call a getter something should be returned, i guess he is just wanting output, but anyway beyond my rant

From i guess what he is wanting you need a list of Limbs in your abstract class and something to add them or add them in the constructor

why are you doing this?
this sort of defeats the purpose of your limb interface

Arm[] arms = new Arm[2];
Leg[] legs = new Leg[2];
dickersonka 104 Veteran Poster