Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

My bad, but the fact remains that as you stated:
>>You can't call class members without making an instance of it.

My methodology may be a bit off having been kept awake all night last night :zzz:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Let me say welcome to the forums :twisted:

That being said, questions belong in the appropriate language/platform forums and to be honest I wouldn't have a clue how to integrate 2 softwares I've never heard of without having direct access to both of their source which is much more than I'm willing to work on for free :icon_twisted:

Best of luck though.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

And I'm sure the community will be happy to have you numbered amongst us :twisted: Welcome

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Welcome Todd, hope you enjoy your stay here in DW Land :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Ack, I fell behind on my greetings again!

Welcome to the forums Mike! :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

And if you really NEED to do it in another class, it'd just be an abstraction of what farooqaaa provided above but would require an appropriate constructor for the class object allowing pass-in of the string you're filtering.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

You never instantiate AppUtils.

You wrote the class for it but never actually create an instance of the class as such:

AppUtils myUtils = new AppUtils();

All class objects need to be instanciated prior to use.

Your usage would then be:

aName = myUtils.myDogs[x].Name;

Hope that helps :) Please remember to mark the thread solved once your issue is resolved.

Edit: Disregard this, Lusiphur's Red Bull cycle hadn't completed yet and his brain hit 'standby' mode... Was thinking regular (not static) classes when I typed this :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

If you no longer have a Default2 file then simply change

<%@ page language="C#" autoeventwireup="true" inherits="Default2, App_Web_caknetlg" %>

to this

<%@ page language="C#" autoeventwireup="true" %>

Particularly as the compiler is saying it can't find 'App_Web_caknetlg' either.

For future reference, please name your threads accordingly. Not every simgle thread that you write needs to be named "asp.net" as that tells us nothing about your specific problem.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

What would likely REALLY help here would be for you to provide samples of your code on the INSERT statement portion of your web-app.

Hard to provide a solution if we can't see the problem :) Possibly any error results you're getting would be helpful as well.

Edit: What would also be helpful is if you posted once instead of twice with the same question in 2 forums :twisted: Since this is an ASP.Net question it should have only been posted in the ASP.Net forum not there and here.

It would probably be best if you kept your follow-up to this in the ASP.Net post as you're more likely to get web-app designers answering you there.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I'm a big fan of how I said I wasn't going to post a long detailed explanation then did >.> Waking up at 4am for the LOSS!! :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Here you go...

Hope that helps :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Only thing I'm going to say here is... when did DaniWeb become the equivalent of a compiler's built-in syntax and error checker?

If you have a specific problem with the code or it's not working in an expected way it would be appreciated if you would provide the error details for the community here to work with instead of plastering a chunk of code (without the code formatting braces) into the page with the title "check the code for errors".

Ezzaral commented: Agreed. +13
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Ok... first off... this same question was already answered for you at least once in the past.

Secondly, this same question was already answered for you at least once in the past......

I could list out the 4-5 times you've posted this same question but in the end it boils down to the fact that you have junk in your web.config files that is not compatible with the server settings that are on your web server and you need to eliminate all but the items that are compatible.

There is really no need to keep asking the same question over and over again because you're just going to get the same answer over and over again.

Hope this helps :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Well dayum... I was about to go and give a big well-worded example of the use of methods vs direct data access and then I read the 1 reply and saw that pritesh had beat me to it :twisted:

It's basically just for data protection/hiding in the end.

By having get or set methods defined for a variable in a class you can set a variable as read only, write only, or read/write capable and the calling program need never directly access the variable directly.

Edit: A more fitting example for what I've described of the use of methods would be as follows

class Point {
    protected double x, y;
    public Point(double x, double y) { //Indirect access to x & y via public method "Point"
        this.x = x;
        this.y = y;
    }
    public double X {
        get { return x; } //Read Only access to protected/private variable "x" via public method "X"
    }
    public double Y {
        set { y = value; } //Write Only access to protected/private variable "y" via public method "Y"
    }
}

Let's say, for example, you have a program where you want to be able to set a value for "y" but not read from "y" directly... You then wanted to have a process run on "y" and the result set to "x" which you want to be able to read, but not be able to directly write to. You might approach that as follows:

class YtoXClass {
    private …
ddanbe commented: Good explanation (at 4 am?) +7
finito commented: good explaination +2
Duki commented: Great examples +7
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

If you're using SQL server for your database then you're using a relational database environment which allows you to utilize linked tables with related information.

What I might suggest is you check these tutorials on creating relational databases as they may help you decide your DB setup.

Hope that helps.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Google is your friend...

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster
public partial class Form : System.Web.UI.Page
{
    private void connecttodb()
    {
        OracleConnection conn = new OracleConnection();
        conn.ConnectionString = "User Id=WLL; Password=wll; Data Source=WLL;";
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if(!Page.IsPostBack)
        {
            String CommandText = "Select DepartmentID,Department from its_department;";
            OracleDataReader odr = GetDr(CommandText, ConnectionString);
            DropDownList1.DataSource = odr;
            DropDownList1.DataTextField ="Department";
            DropDownList1.DataValueField ="DepartmentID";
            DropDownList1.DataBind();
        }
    }
    private OracleDataReader GetDr(String sqltext, String ConnectionString)
    {
        OracleDataReader dr;
        OracleConnection oracle_conn = new OracleConnection(ConnectionString);
        OracleCommand Oracle_cmd = new OracleCommand( sqltext, conn );
        Oracle_cmd.Connection.open();
        dr = Oracle_cmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection);
        return dr;
    }
}

Issue was with brace ending Page_Load. General rule of thumb that I work with is to always ensure that when I open a brace I immediately close it and then start filling betwen the braces with my statements. This way I never forget to close a brace. Also, not sure if the posted code reflects your actual code but ensuring that tab stops are enforced (4 spaces per indent level) uniformly throughout your code makes it easier to spot and correct things like that.

Hope this helps :) Please remember to mark the thread solved once your issue is resolved.

Edit:

u have missed brace for partial class form

Incorrect but s'all good...

Add a braces before "private OracleDataReader GetDr(String sqltext, String ConnectionString)"

This was correct :twisted:

Geekitygeek commented: well written and spot on +1
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Really, it's not a horrible thing to post your code here, just take whatever error you're receiving and type it here (an error message with no code is better than no error message and no code) and if possible paste any relevant code segments that are even remotely related to the error in question encased in the [ code] blocks.

This gives others who are trying to help you more information to work with and a better chance of pinpointing your issue.

Stating that you are "facing a problem with one of your class" doesn't really give anyone any information to solve the problem and asking them to email you outside of the forum goes against the rules which state that things should be kept "on the site."

So don't be afraid to toss large code chunks at us as long as you also toss the error message(s) you're receiving along with them so people can actually help you out :) It's not like others haven't thrown page long code snippets at DaniWeb before.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Wow... Really? You resurrected this 19-20 days later just to quote the original error/solution to us? :confused:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

PLEASE NOTE: DaniWeb WILL NOT delete code upon request

Aww... and I was going to demand that someone go and manually search through all of my posts for any and all references to any and all URLs and have them changed/removed :icon_twisted: Oh and I was going to be impatient about it and act like it was someone else's responsibility that I had posted the URLs on a publicly accessible (and Google-able) site in the first place.

So just to make sure, I can't do this now? :icon_cry:

((As a note, not referring to the Original Poster here))

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Completely agree with Permalink.

Names are to the left, permalink is a link to get the direct link to the post in question :) But thanks for the agreement.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I mean seriously... Especially when it was ME who was right first :'(

LoL Sorry, had to say it Ryshad. And I agree completely with what you said but um... now you and I are both guilty of refreshing the thread to point out that the thread didn't need to be refreshed :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

And on the topic of "supporting DaniWeb" why not become a sponsor :twisted:

That's what I did when I realized how useful the site is and that I'd be spending MUCH more time here than I originally intended :P

BTW, welcome and junk.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Well thanks all for your feedback (all 3 of you :twisted:)

'Solving' thread as general housekeeping :)

Edit: Or... maybe I solved it a few days ago and just forgot to remove it from my subscriptions >.> I must be getting tired lol

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Welcome to the forum, hope you enjoy your stay :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Welcome to the forum, hope you enjoy your stay :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

That depends on you really... if you've got the focus and the time I'd say do 'em both at once but if you find you need to focus more directly when learning new things then take 'em one at a time.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Welcome to the forum, hope you enjoy your stay :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Welcome to the forum, hope you enjoy your stay :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Welcome to the forum, hope you enjoy your stay :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Welcome to the forum, hope you enjoy your stay :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Welcome to the forum, hope you enjoy your stay :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Welcome to the forum, hope you enjoy your stay :)

As for your language choices I think you're on the right track with java but I'd definitely hit up C++ as well because as you said, it's a great idea to have multiple languages under your belt.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I wouldn't say that posters are "dumb"...

It's not a reflection of peoples' intelligence that they post questions that seem more like copies of their homework assignments than anything else.

It's not a reflection of peoples' intelligence that they refuse to do any research prior to posting questions that likely have been asked 5-10 times previously in DaniWeb, let alone being available in the first 3 Google results you'd get if you search.

What it is a reflection of, however, is the disturbing trend of laziness that seems apparent these days. People don't seem to have any interest in researching for themselves, putting effort into trying solutions before asking questions or, in fact, taking what answers they do get and filling in the blanks for themselves.

Granted it can be less than appealing to attempt to answer questions for people who seem to put no effort into their issue and expect things to be done for them... but it's not a reflection of their intellect, it's a reflection of their work ethic :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Rough is good - friction and all that.

While we're on the topic of TP...

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

if we assume each character is a byte (generally)

Which is why I said "if we assume" each character is a byte :) Correctly noted that different encoding produces different sizes and as such one should determine the size of each character unit prior to relying on my example.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Spoons don't make people fat. Swimming suits don't drown people. And guns don't kill people. It's a tool, just like a hammer or tractor or garbage disposal. You don't misuse those tools, and most people don't misuse firearms.

And my only question for you is this... If most people don't misuse firearms then why have them in the first place as there appears to be no valid use for firearms in today's society.

Keep in mind that by firearms I refer primarily to those not being used for 'sport' (aka hunting or firing range or marksmanship). If the average person who owns a gun and totes it around on their hip would never misuse it... and the average person who owns a gun and totes it around on their hip is fairly unlikely (as is an unarmed person) to be mugged tomorrow, or run into an invading army, or have their government turn on them... then what, specifically is a 'valid use' of having the gun on their hip such that it's use would constitute a need to carry it in the first place?

You speak of there not being a 'Wild West' mentality involved but let's be honest, the ready presence of a gun at close hand increases the likelihood of firearms related violence (self defence or otherwise) merely due to it's proximity. Granted, there are only a small subset of states within the USA that are to the extreme that you would generally see average citizens …

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

This would be a number that they can publicly identify themselves with, to differentiate themselves from other companies that have a similar name.

is ther a publlic database to look at company accounts?

Not sure how it is in the US but I would assume it's similar to what we have here in Canada. Any business registered with the government (ie: any business that pays taxes and doesn't risk their owners going to jail for tax evasion) is assigned a Business Number. In most cases you can find a company's business number by searching the government's corporate registries as long as you know the province the company was registered in.

I'm sure similar is implemented in the United States.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Well I'm glad it's solved... but again if the entire box is clickable as a link I still think that it's related to the fact that converting something to a hyperlink tends to add a border spacing to it that expands it's size... not sure how to combat that on non-image links however.

Don't forget to mark your threads solved once you've found the solution though :) And good luck.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Why certainly!!

As gained from here:

<SCRIPT LANGUAGE="JavaScript">
      <!--
      document.write("The current URL is : "+location.href)
      // -->
</SCRIPT>

You will need to modify it a bit to match the input you want for your 404 but that snippet will get you the URL of the current page the user is on.

Hope that helps :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

when i tried to make the logos linkable

Did you set the border to 0 on your logos? If you don't have a border="0" statement in your logo image source html then what will happen is you will get a padded border around your logos when you make them into an URL link. This might explain the inexplicable 20px shift of your content.

Hope that helps :)

Edit: However, it looks as though you're applying the hyperlink to text and not image so I'm not really sure what would be doing it... If they were images my above explanation would be worth looking at :P

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Sounds about right :twisted: Glad you got it sorted.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Sounds to me like someone changed one of the columns to require unique values and now, when you are attempting to delete individual rows you're running into a uniqueness error.

Technically, SQL should have prevented the process of setting a unique column while there were non-unique values within it but...

What I would recommend is that you change whichever column has been set to requiring unique values such that it no longer requires this... Delete or change all non-unique values such that all values in that column are unique and then re-create the column rule for uniqueness after that.

While the unique constraint is on the column it will give you that error every time you attempt to remove columns as you will be removing one non-unique row but there will still be other non-unique rows present.

At least that's what it looks like from that tiny screen shot you provided without any additional information to base my assumption on :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

For starters you could provide us with the code segment that is related to your MS Access connection and UPDATE/INSERT statements and perhaps some of our fine MS Access knowledgeable members would be able to troubleshoot from there :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

While I don't disagree that your method will work, dnanetwork, writing and reading to the database for every single action the user performs? Seems a bit high in overhead to me.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I did not know about that one. Thanks.
One legitimate use is in industrial applications where it is necessary to prevent the operators from running other apps (i.e. Games).

See, now I wouldn't have thought of that reason :twisted: Guess it shows where my head's at at 3am (when I was first reading this thread).

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Well, if "cmd.Parameters.AddWithValue("opid", textBox1.Text);" is uncommented then from what I'm seeing it serves no purpose as you use

SqlCommand cmd = new SqlCommand("update outpatient set nm = @nm, addr =@addr,phno = @phno, mobno = @mobno,problem =@problem,docid =@docid,docnm =@docnm,spea = @spea,app = @app, age =@age,dt = @dt,ti = @ti where opid=" + textBox1.Text.ToString() + "", cn);

However right there you have a problem because what it should be is

SqlCommand cmd = new SqlCommand("update outpatient set nm = @nm, addr =@addr,phno = @phno, mobno = @mobno,problem =@problem,docid =@docid,docnm =@docnm,spea = @spea,app = @app, age =@age,dt = @dt,ti = @ti where opid='" + textBox1.Text.ToString() + "'", cn);

Realistically you could get away with eliminating the entire line

cmd.Parameters.AddWithValue("opid", textBox1.Text);

as it is not used in your UPDATE string.

The lack of single quotes around your inserted textbox value is where you are receiving a SQL error for an invalid input because it's trying to say "WHERE opid=value" and it should be saying "WHERE opid='value'".

Hope that helps :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Why would you want to do this though?

The only reason I could see for disabling task manager is if you're trying to do something you shouldn't be and don't want the user to be able to abort your processes.

Also, administrator (on many OS's) has the ability to lock out task manager access to non-admin users on a per-machine basis so there should be no reason to be doing so programatically for any valid purpose I can see.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Nowhere are you setting the values for the objects oXL and oWB.
I suspect the null exception is due to this.

heh, I assumed he did that elsewhere and hadn't included the code... my bad :(