dickersonka 104 Veteran Poster

I use both business and enterprise, i think business is more than sufficient.

dickersonka 104 Veteran Poster

Change

order by isnull desc

to

order by isnull
dickersonka 104 Veteran Poster

my bad, used my sql
here is the correct way

SELECT completed, ISNULL(completed, NULL) AS 'isnull'
from table
order by isnull desc, completed desc

the order by might need to be changed, based upon the column type of completed, but the select works

dickersonka 104 Veteran Poster

If you have functionality in the exe then go the webservice route

If you have display then use php or html, for that

Here's a sample of php calling C# web service
http://randompost.ca/random/php-calling-c-net-webservice/

For c++ it will be a little different, but thats the idea

dickersonka 104 Veteran Poster

An option could be to change your exe to a web service. Communicating with an executable from a web application and distributed application is not something you normally want to do and super complicates things.

dickersonka 104 Veteran Poster

what about this

<td>
<img src="<%=j%>" />
dickersonka 104 Veteran Poster

That should work.

You might need to use

out.print(j);
dickersonka 104 Veteran Poster

add an extra column to the select

SELECT completed, completed IS NULL AS isnull
from table
order by isnull desc, completed desc
dickersonka 104 Veteran Poster

If they are only supporting index.htm, they might not be supporting asp.net pages. Normally, you can set through cpanel or whatever you have, a startup page or set the order on default.aspx, index.htc, etc..


But if they do, then create an index.htm page to redirect to your home.aspx page.

<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.yourdomain.com/home.aspx">
dickersonka 104 Veteran Poster

You are just missing the additions of the strings here, in all your numbered lines do this

System.out.println("1." +first.getTitle()     [B]+[/B]     "........." +first.getPages());
dickersonka 104 Veteran Poster

Very good.

That is the general concept of object oriented programming. Although, everything works together, they are still separate entities that are used to communicate with each other, and only do THEIR specific task.

dickersonka 104 Veteran Poster

Here is one on Microsoft, a little technicalhttp://msdn.microsoft.com/en-us/library/aa645739(VS.71).aspx


Here is a little less technical and probably easier to follow
http://www.csharphelp.com/archives/archive253.html

Once you read them,
create the event in the server class, such OnServerStarted

in the notify class, create a server private variable and subscribe to each event

then on each event that is received, you can update your text as the event is received

dickersonka 104 Veteran Poster

If you're not into the singleton thing, you need to think of the separation between the display and server.

Look at using events,
example when server is started, you catch the event in the notify icon and update the display properly, without having the server ever know about what is displaying in the ui portion.

dickersonka 104 Veteran Poster

If you pass server to it, any other class that uses this notify icon will require to instantiate it with server, when possibly they might not have anything to do with server.

dickersonka 104 Veteran Poster

The server doesn't know about the icon, because its part of a separate class

I forgot to add the private constructor to the server class, plus a few things to do

try this, add this to the server class

private Server()
{
}
private string _status;
public string Status
{
get
{
return _status;
}
}

public void Stop()
{
_status = "Stopped";
}


//in your last piece of code
icon.text = Server.instance.Status;
//might need to be this
icon.icn.text = Server.instance.Status;
dickersonka 104 Veteran Poster

user_id isn't a string is it?
if not, it doesn't need the ticks, can you try running it without them?

can you try to run the same query in query browser if you have it?

dickersonka 104 Veteran Poster

i meant store the query in a variable, then output it, just to make sure all the semicolons and commas are out there, just as a degub step

i think something isn't getting set properly when issuing the query and just want to see it output

dickersonka 104 Veteran Poster

One more thing, you need to terminate it with a semicolon

dickersonka 104 Veteran Poster

store the query in $sql
and echo it out before you run it

and by the way, only one row will be returned, not multiples

dickersonka 104 Veteran Poster

Separate out the classes, and create a singleton

public class Server
{
private bool _stopped;
public bool Stopped
{
get
{
return _stopped;
}
set
{
_stopped = value;
}
}
    private static Server _instance = new Server();

public static Server instance
{
return _instance;
}
}



//from your notify icon class
Server.instance.Stopped = true;
dickersonka 104 Veteran Poster

A good way to think about top level objects, is what ways you 'access' this object.

You interact with the top level objects, for the top level objects to interact with low-level objects.

An example is you can use the door on it, but regardless of the door, you have no clue how it works on the inside.

Once again depending on how the instructor is presenting things here are a few possibilities.

Keypad, Timer Display, Electrical cord

dickersonka 104 Veteran Poster

You could use the bottom statement only and get the avatar id, then issue this query to get the pic

select * from avatar where avatar_id ='{$avatar_id}'

here is the consolidated one, where you need ONLY this select statement

select
        ma.user_id,
        ma.memberfname,
        ma.memberlname,
        ma.avatar_id,
        a.pic
from
(
select
members.user_id,
members.memberfname,
members.memberlname,
coalesce(avatar_id, 1) as avatar_id
from members
left join avatars on members.user_id=avatars.user_id
) ma
inner join avatar a
on a.avatar_id = ma.avatar_id
where ma.user_id='{$user_id}';
dickersonka 104 Veteran Poster

You can either get the avatar_id from this query

Then run an additional query to get the pic, or if you want to consolidate everything in a single let me know, and i'll post one more to consolidate everything.

dickersonka 104 Veteran Poster

you get the avatar_id from this query

do you have an pic for avatar_id of 1?

dickersonka 104 Veteran Poster

It won't show the avatar with grabbing the pic column.

Assuming this is either a byte array or file path to their picture, you need to grab this column as well.

Is that what you are meaning?

dickersonka 104 Veteran Poster

Whenever you just run this piece

select 
						members.user_id, 
						members.memberfname,
						members.memberlname,
					coalesce(avatar_id, 1) as avatar_id
					from members
					left join avatars on members.user_id=avatars.user_id

What do you see?
You should see all the members, with their avatar_id's unless they don't have one, with an id of 1

Is this the result you see?

dickersonka 104 Veteran Poster

i'll stick with the coalesce

make sure your join is on the column that will be in both tables, use a left join, and make sure to use an alias on your coalesced column

[B]left join [/B]avatars
on [B]members.user_id = avatars.user_id[/B]
dottomm commented: Thank you. All your help is greatly appreciated! +1
dickersonka 104 Veteran Poster

use a left join and specifiy your columns with a coalesce on avatar id

select
user_id,
coalesce(avatar_id, 1) as avatar_id
from members 
left join avatars
dickersonka 104 Veteran Poster

A good way would be to include the parameters in the query string

<a href="www.thispage.com?county=Chaffee&state=Colorado"> Chaffee </a>
dickersonka 104 Veteran Poster

I would suggest it is bad practice to use the image_id for sequence. Add an int column to use for sequence, update it if necessary.
You shouldn't need to update it, if you use order by with sequence column, this would be a much cleaner way, than updating an id column.

dickersonka 104 Veteran Poster

Easiest to just make it an aspx page and add the javascript to that. If you just need javascript here's a couple links on parsing the query string through javascript.

http://triaslama.wordpress.com/2008/04/12/retrieving-query-string-values-in-aspnet-and-javascript/

http://support.internetconnection.net/CODE_LIBRARY/javascript_Parsing_Query_String.shtml

dickersonka 104 Veteran Poster

this is hibernate, relating database to OR mapping

dickersonka 104 Veteran Poster

For this you can use a query string or session, query string might be easiest.

[B]connect.aspx.cs[/B]
protected void picUpload_Click(object sender, EventArgs e)
{
int year = 1870;
Response.Redirect("upload.aspx?year=" + year.ToString());
}

in the receiving page
private void Page_Load(object sender, System.EventArgs e)
{
int year = Convert.ToInt32(Request.QueryString["year"]);
}
anitha joe commented: Really Helpful +1
dickersonka 104 Veteran Poster

Where are you calling countfile from?

Also ensure you have proper access on the c:\pictures\ directory, remember IIS is most likely using the asp.net service account to read the directory. You need to set the app pool user with permissions on this folder.

dickersonka 104 Veteran Poster
dickersonka 104 Veteran Poster

It might be, could be in /usr/share or /usr/share/bin, is it giving a classnotfound when you try to use it this way?

dickersonka 104 Veteran Poster

Yes its in C#

dickersonka 104 Veteran Poster

to get the files use

string dir = @"C:\images\";
string[] files;
int numFiles;

files = Directory.GetFiles(dir);
numFiles = files.Length;

string nextFileName = (numFiles + 1).ToString() + ".jpg";
dickersonka 104 Veteran Poster

Not the easiest task if you are just starting out, but here's the concept.

You can create a table with the same structure and use it for auditing. Use the triggers to catch the insert,update, and deletes and then store the records into the second table as well.

Or you can create a single table for all changes and record them, composing dynamic statements on the fly.

Then you can create an aspx page like normal, and select from the audit table.

If you have very few tables and just starting out, i would suggest the first route. It really depends on how you are wanting to display and if you are wanting to query the data back. If you need any further explanation feel free.

Here's a link of something similar.
http://www.4guysfromrolla.com/webtech/091901-1.shtml

dickersonka 104 Veteran Poster

jdbc driver needs to be
Class.forName("com.mysql.jdbc.Driver");

dickersonka 104 Veteran Poster

Are you searching the correct container?

ie if you add it to a panel. Use panelId.FindControl

dickersonka 104 Veteran Poster

bill table should not have a primary key of patient
a patient will have multiple bills
that patient should not have a column of pbill, unless it something associated with the patient

move pbill to bill table
then you can have a patient with multiple bills, and i'm not sure why the employee is present, i don't see where you are relating it to anything