hericles 289 Master Poster Featured Poster

Check if Staff2 has any rows. If zero rows then say no records found.

if(!dsSrcStaf.Tables("Staff2").Rows.Count() > 0) {
  // display "no records found" message
} else {
  // the code you already have
}
But get rid of the message box saying search found:) No one wants to click on a message box when things worked out OK. The fact that results populated is enough of a hint that things worked.
hericles 289 Master Poster Featured Poster

Do you get an error at all? Check the string value of path2 and make sure it is a valid path.

hericles 289 Master Poster Featured Poster

Coalesce is available in MySql and it works as defined above by reverend_jim.

hericles 289 Master Poster Featured Poster

Are you calling that code at a point before LocationComboBox.Text.ToString is set? It sounds like it is getting called when the page loads for the first time (and every page reload). What do you have in your Page_load() event?
Besides that, it sound alike the data table is empty. Can you confirm the SQL query is returning a result?

hericles 289 Master Poster Featured Poster

For the first part of your question you don't need the object to hold the data. You can access the row and column of the dataTable in the dataset. I normally simplify this by using a dataTable instead.

Dim dt As new DataTable
myDA.Fill(dt)
SystemNameTextBox.Text = dt.Rows(0).Item(0)
LocationNameTextBox.Text =  dt.Rows(0).Item(1)
LocationIDTextBox.Text = dt.Rows(0).Item(2)
SystemIDTextBox.Text = dt.Rows(0).Item(3)

As for your second question the answer above may help.

Dim SystemID As String
SystemID = myDB.Fill(db, "blsys_systems")

Trying to allocate a filled dataSet to a string isn't correct. Just use

myDB.Fill(db, "blsys_systems")

to fill the table "blsys_systems" in the dataSet db and then access the Row(0).Item(0) to get the systemID out. You could also forego the whole dataAdapter approach and use executeScalar() function of the command object to return the string if you are only expecting one result.

hericles 289 Master Poster Featured Poster

Well, there you go. And I learnt something too. A good day...

hericles 289 Master Poster Featured Poster

If you view the page source you will see that the text you are after isn't even contained in the page. It is an iFrame which calls a php script to handle the actual maths. Not sure how you are going to get around that...

hericles 289 Master Poster Featured Poster

If you have a field that holds the email you can include a LIKE clause in your query. E.g. to find all Hotmail address:

SELECT emailAddress FROM table WHERE emailAddresss LIKE '%hotmail%';

The % in the query indicate where hotmail should be in the string. By including % at the start and end you are saying that hotmail could appear anywhere in the email address. hotmail% would mean that hotmail is the start of the string.

hericles 289 Master Poster Featured Poster

Firstly, to remove the obvious, if you were to run that query directly against the database how many results should you get?

hericles 289 Master Poster Featured Poster

What the error message? They generally point you in the right direction.

hericles 289 Master Poster Featured Poster

Do you know how to connect to a database and run an SQL query? Sufyan was simply saying that you can have 1 table for all users with a column that specifies their role. You then execute your SQL query:

SELECT * FROM users_table WHERE user_name = userID AND password = pwd;

Thats in its most basic form of course. You may not want to select all and your columns may vary but that query will return the number of rows matching that query and the result should be 1. If you use a dataReader to catch the result you can iterate to the role column, check the value and then do your redirect based on it.
Does that help?

hericles 289 Master Poster Featured Poster

OK, a basic join would look like this:

SELECT name_prof, name_course FROM profs join courses on profs.cod_course = courses.cod_course order by name_prof;

When doing joins you need to specify with the ON clause which columns in each table form the linkage. And if you refer to a column that occurs in both tables you need to fully qualify it as tableName.columnName.

hericles 289 Master Poster Featured Poster

If you are needing to combine the data across those three tables you will need to do a join. Can you post up the actual structure of each table? That way we can help you more, at the moment we would just be guessing about the columns.

hericles 289 Master Poster Featured Poster

There is an actual PHP forum on this site where this might get answered better...

hericles 289 Master Poster Featured Poster

You have referred to the table as Price_Ranges and PriceRanges. Which one is correct? If it is Price_Ranges in the database then no, dbo.PriceRanges does not exist.

hericles 289 Master Poster Featured Poster

Have you sent the tab index for the controls? If you aren't familar with it, in the properties for the control in the VS IDE you can see the tab index. This is simply a numerical control for setting the order the controls are reached via using tab. Control 1 leads to control 2 which leads to control 3 etc. Controls with a tab index of -1 are never focused when tab is hit (I believe, I haven't used a value of -1 in a while).
Simply enter the tab index for each control so it flows nicely. The focus moves to the address bar from the last control on the page that can accept focus.

hericles 289 Master Poster Featured Poster

On your form you will need a drop down list, textbox or slider control to accept the pen width as input from the user. Save this width to a variable and then when you are creating the pen use that variable to set the width.

float width = // input from the user
Pen blackPen = New Pen(Color.FromArgb(255, 0, 0, 0), width)
hericles 289 Master Poster Featured Poster

Why are you trying to shuffle in the database? Extract the questions and ID into a dataTable and randomly select which ID will be next (or shuffle if you want the order to be established before the test begins). You could easily record which question was the previous one using an array or arrayList.

hericles 289 Master Poster Featured Poster

Heading tags are considered block level elements (as are divs) so the inclusion of a H tag forces everything below it to move down. Text added directly or in elements like <span> are considered inline and don't have the same effect.
If you ever want a block element to behave like an inline element add

display: inline-block;

to the CSS for the block element.
I hope that helps.

hericles 289 Master Poster Featured Poster

If you want to get the max value from one column you don't need to bother with the dataTable or dataSet at all. SELECT MAX() returns the max value so just parse the result from the executeScalar() command.
But, beside that, seeing you aren't using parameters check your column names are correct.

hericles 289 Master Poster Featured Poster

There is no CSS file to go with this? And do you really expect us to troll through this looking for where the color is set? I get the feeling you just copied the whole query library into the post. The code from your web page would be far more useful.

hericles 289 Master Poster Featured Poster

Make sure your value types match the column types in the database table. For example is mr_no a string or an int?

hericles 289 Master Poster Featured Poster

You will want to look at the httpwebrequest class and its methods. You can feed it a URL and get back the source (page) to do with as you will. The MSDN articles that come up of you google httpwebrequest will help you.

hericles 289 Master Poster Featured Poster

Well you could make subclasses wood, gold, stone and food of the super class Resource. essentially they would be basic classes and use the implementation of the Resources class for most things, unless something specific arises. But then you would have easily identifiable classes in code that follow similar rules.

hericles 289 Master Poster Featured Poster

Do you need all of the columns out of the database or could you just select only the ones you need? Most of the time SELECT * isn't really needed.
If not, you can bind various columns of your gridview to the columns of the data source in code. This post maybe a little old but explains the theory:
http://www.gamedev.net/topic/417402-how-to-map-a-datagridview-column-to-a-column-of-the-datasource-datatable-csc-2005/

hericles 289 Master Poster Featured Poster

In that case can you confirm the number of columns in the database table matches the number of columns you are trying to insert? If they aren't the same but some columns have defaults set you can specifically name the columns in your SQL statement.

dbInsert.CommandText = "insert into table1 (col1_name, col2_name, col3_name...etc) values (job_code,mr_no,mr_date,itemcode,qty,status,auth_date);"
hericles 289 Master Poster Featured Poster

You aren't accessing the database correctly. You normally use a dataAdapter to fill the dataTable.

Dim da As new MySqlDataAdapter(cmd) // pass in your command object here
da.Fill(dt) // automatically open connection, extract data to dt and close connection

Now you have a dataTable with your data in it.
ComboxBox1.Items.Add(dt) won't work either. You can loop through the dt adding each item or link the dt as the ComboBox1's data source.

hericles 289 Master Poster Featured Poster

Your include a parameter called mr_approved_date but in your SQL you refer to auth_date. This probably has something to do with it

hericles 289 Master Poster Featured Poster

Total number of rows in the database or in one particular table? The rows in a table can be returned with SELECT COUNT(*) FROM table_name.
Once you have loaded a file in a stream you can use the .readLine() function to move through the file. Then just split the string appropriately to extract the number you are after

hericles 289 Master Poster Featured Poster

It is called inheritance. Your class is being declared as a subclass of the inherited class. It follows a 'is a' relationship e.g. a car could inherit from the vehicle class with

public class Car : Vehicle

The main advantage of this is that the Car class gains access to methods of the Vehicles class (as you will know from building your custom controls). If the vehicle class had a method called moveForward(), it could be accessed via the Car object.

Anyway, this MSDN post sums it up pretty well:
http://msdn.microsoft.com/en-us/library/ms173149.aspx

hericles 289 Master Poster Featured Poster

SELECT mem_id FROM members WHERE mem_id NOT IN (SELECT mem_id FROM position_1) would give you the men_id's in members that aren't in position_1.
You can extend the NOT IN (SELECT... to include the other position tables using a standard JOIN.
The result (untested) should be those mem_id's that only feature in the members table. I hope its right anyway;)

hericles 289 Master Poster Featured Poster

MySQL can hold massive amounts of data and search it quickly. It is comparable to MSSQL or Oracle in terms of use in large projects (without getting down to the nitty gritty differences). MySQL is used on most web hosts for the simple reason that it is free.

hericles 289 Master Poster Featured Poster

By using float you are removing the sub div from being "inside" your wrapper. You can consider it to be "floating" on top. Because it has lifted out in this way the wrapper can't wrap itself around the div. Try replacing the float command with display:inline-block for the 2 divs - that should make them appear beside each other, which is what I think you were trying to achieve with the float.

hericles 289 Master Poster Featured Poster

Are you getting a syntax error? I think it is because you aren't using the WHERE clause correctly. You need to have:

WHERE Laminate = '" & ComboBox2.Text & "'" & "AND WHERE <another column> = " & "'" ComboBox3.Text & "'"

By missing that second column you are saying "WHERE laminate = some_text AND some_other_text.

hericles 289 Master Poster Featured Poster

Is the email you are sending from a valid address for that domain? If not then gmail is probably not sending using that address as it doesn't comply with the security credentials you supplied.

hericles 289 Master Poster Featured Poster

Its perfectly logical. It is how most sites handle their internal messages. There is no need to over think it. You can include all the functionality of emails (bcc, cc, attachments, replies, etc) as well.

hericles 289 Master Poster Featured Poster

Do you want them to send an actual email (i.e. the message appears in their email account) or send a message to the user the next time they access your app (message sent and held by your software)?

mmazeemahmad commented: thnaks +1
hericles 289 Master Poster Featured Poster

You refer to a.button in your CSS when the id is called button. You would access that is the CSS with #button.

hericles 289 Master Poster Featured Poster

You shouldn't need to match the your home user name and password to the office one as it is the particular database you are trying to access and that has no record of the sql server login details. But if you have changed them to match that shouldn't cause a problem anyway.
Have you confirmed it installed correctly? i.e you can run queries against the database on the command line or using the admin screen?

hericles 289 Master Poster Featured Poster

Go to the control panel and select users accounts and pick the account you want to change (if there is more than one) and you'll see the option to remove the password.
To disable programs from startup click run in the Start menu and type in msconfig and hit enter.Select the startup tab and disable whatever you need to. NOTE: I'm not to blame for you inadvertantly turning off the wrong things :)

hericles 289 Master Poster Featured Poster

Add this to your CSS file:

table {
  margin-bottom: 10px // or whatever spacing works for you
}
hericles 289 Master Poster Featured Poster

size isn't a CSS property or is font either. You would ned to use font-family and font-size in your CSS file for these to work. Why the mix of inline and external styles? Everything can easily be put in your CSS file.

hericles 289 Master Poster Featured Poster

Are you wanting to start a service? Some code that runs in the background with no visual interface?

hericles 289 Master Poster Featured Poster

The stream reader will let you access the text in the file. Once it is a string you can do whatever you want with it

hericles 289 Master Poster Featured Poster

Are you including variables in your string? Syntax errors are easy to get if you don't watch your spaces and accidentally concatenate some text together.
Of course, you haven't posted up your SQL query so we can't give you very accurate advice.

hericles 289 Master Poster Featured Poster

You will want to check out how to use the stream reader class to open a file (stream) and read the data.
The MSDN article can be found here:
http://msdn.microsoft.com/en-us/library/system.io.streamreader.aspx

hericles 289 Master Poster Featured Poster

background-color is a CSS property so I would add that to whatever styling rules you are applying to those areas.
Did you write this code or download it from somewhere? You have a style rule floating in the middle of the page.
And your PHP session_start() code needs to be the very first thing on the page to work i.e. right at the top, the first line of code. You can't have it further down the page like that - unless my PHP is very rusty...

hericles 289 Master Poster Featured Poster

He was referring more to the fact that you set radioButton1_CheckedChanged = true
and then two lines later have an if statement checking if it is true or false. It can't possibly be false so the second part of your if statement never fires.

hericles 289 Master Poster Featured Poster

Normally you would use the background-color property of the div. If you want it to extend the width of the page set the div width to 100% (or whatever width is relevant if you only want to cover a certain area) and then center your banner and menu.
Does that help?

hericles 289 Master Poster Featured Poster

This happens because the cell it is looking to get a value out of does not exist. Nothing was extracted from the database (or whatever the population method was) and so it crashes when it hits the null value.
You can either use defaults in your database to remove the null instances (meaning every record has some form of data in it) or add error checking in your code that can recover from trying to access a null object.
If an entire column is missing you may not have limited your search criteria or loop length to the number of columns in the data table. This is most commonly done by forgetting that the lengths of these objects are zero based and so if there are 5 columns in the data table your loop should run from 0 to 4, not 5.