hericles 289 Master Poster Featured Poster

Access denied means you need to look at your connection string. You're pointing to the wrong database, have the user name wrong or that user doesn't have access to that particular database. Something about your connection attempt is the cause of the error.

hericles 289 Master Poster Featured Poster

If your HTML snippet is the same for all rows then each product has a label with a class of 'count'. Which means in your jQuery all of the labels get incremented as the jQuery is affecting all of then, not just the one beside the button you happened to click. Currently you have no way to inform the jQuery function which label it should be increasing.
You could give each label a unique name and pass that name into the function when you click each button. To do this you'd need to add an onclick to each +/- button which calls the function with the parameter.

hericles 289 Master Poster Featured Poster

Yes, it would. If you don't want to include empty values then either option would still work but you would add a acheck to see if a particular textbox was empty before appending it to the sql string (option 1) or running the command (option 2);

hericles 289 Master Poster Featured Poster

As you want it in non-alphabetical order rajeev's post won't help you.
Apparently MySQL has a command that allows you to pick the order of the column's data but I haven't tried it myself.

select * from tablename order by rank='Lcpl' DESC, rank='Pte' DESC, rank='Cpl" DESC;
hericles 289 Master Poster Featured Poster

If you haven't disposed of the data source you could always use that to calculate the total. You can even do this before the button is pressed and store the total for later use.
Or this would probably work:

sum += CDbl(ListBox1.Items(x).Value) // or maybe .Text

You were getting the error because your code was returning a row view and not the value in the row (my VB.net is a little used these day so I maybe wrong).

kingsonprisonic commented: For wrong solution, Also error in code... -1
hericles 289 Master Poster Featured Poster

There are javascript libraries that can detect if flash is installed in the browser. Find and use one of those. You can then detect if flash is there and use javascript to alter the CSS style of the div depending on the result (i.e. what you need to set the margin-top to).

dantinkakkar commented: What you say is correct, but your method will be too long and twisted. Absolute positioning will be much better. -1
hericles 289 Master Poster Featured Poster

I must agree, I only found them after Chris mentioned them in a previous post and I've started to get through them. I knew objective C already (self taught to an adequate intermediate level) but I still learnt a lot about iOS stuff I thought I understood.

mani-hellboy commented: see rules and regulations -1
hericles 289 Master Poster Featured Poster

Hi,
In the selectedIndexChanged event of the first combo box you determine the selected index and include that into your SQL string.

string selectedTeam = comboBox1.SelectedItem.ToString();
string sql = "SELECT * FROM yourTable WHERE team = ?selectedTeam;";
cmd.CommandText = sql;
cmd.Parameters.Add("?selectedTeam", MySqlDbType.Varchar);
cmd.Parameters["?selectedTeam"].Value = selectedTeam;

I'm assuming you have a command object called cmd of course. After that open your connection, execute the command, catch the results in a dataTable or reader and import into the second comboBox. I have made so assumptions about your database table design too of course.

codeorder commented: c# in vb.net forum :( -3
hericles 289 Master Poster Featured Poster

As I said earlier, if you are getting an actual error message please post it up.
Have you debugged the code to check if the data reader contains any results? Or is the error coming from the dr("staffid").ToString() part of the code?

hericles 289 Master Poster Featured Poster

Here is an old function I used to create a random text string.

Random rand = new Random();
        string pw = "";
        Char[] chars = new Char[6];
        int count = 0;
        while (count < 6)
        {
            chars[count] = (Char)rand.Next(97, 123);
            pw += chars[count];
            count++;
            
        }

The rand.Next(97, 123) creates a number between 97 and 123 and converts that into a lowercase letter. The digits are numbers (0-9)are 48 - 57 so if you want numbers and letters you might need to add another random function that decides whether to calculate a number or a letter.

Hope that helps,

codeorder commented: nothing personal, I just preffer seeing vb.net code in a vb.net forum. -2