hericles 289 Master Poster Featured Poster

Hi,
If the ! in the loop was stopping the process, reverse the if statements.
if(dsSrcStaf.Tables("Staff2").Rows.Count() > 0) {
// some rows exist so place you binding code here
} else {
// display "no records found" message
}

hericles 289 Master Poster Featured Poster

If this is a web project use Session state to record the user's role. Then whenever access to a restricted page is required check the session variable to see if access is allowed.
When the admin or manager log in set the session based on their role:

Session["role"] = "admin";  // C#
Session("role") = "admin    // VB.net

or maybe you will enumerate and have numbers that specify the role, its up to you.
Then you can check it with things like:

If(!Session["role"].ToString() == "admin") {
  // redirect away from admin page
}
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

OK... How about posting up the error for us to have a look at?

hericles 289 Master Poster Featured Poster

Are you saying the build errors but doesn't specify what the error is? It should point to the class and line when the problem happened. To go back to a previous build you would need to have been using some form of version control

hericles 289 Master Poster Featured Poster

What is placed into the dataset will be dependent on what you selected in your SQL statement. If you selected user name and password then they will be included.

Without seeing your code it is hard to provide good help.

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

If your stored procedure returns a value then you will need to catch it in a variable. If it returns an int you will need:

int identity = int.Parse(cmd.ExecuteNonQuery());
scopeIdentityReportLabel.Text = identity.ToString();

Or something close to that anyway. At the moment you aren't using anything to hold the return value form the stored procedure.

hericles 289 Master Poster Featured Poster

What exactly do you mean? Update in a database? On a web page? Provide some extra information and we can probably help.

hericles 289 Master Poster Featured Poster

&lt and &gt is normally used in HTML to replace < and >but not in actual code. Replace those &lt and &gt with < and > in your code and it should work.

hericles 289 Master Poster Featured Poster

If you are looking for the actual connection string to connect to a database you need go no further than:
http://www.connectionstrings.com/

It has ever connection string you will ever need.
In terms of connection to a database and manipulating the data the method can change slightly depending on the database you are connecting to. Most databases require particular drivers and connectors to allow the connection.
Visual Studio includes MS SQL and OLEDB (for MS SQL and any OLEDB driven databases). If you want to use MySql then you will need to download the MySql connector.

This is a pretty gentle introduction to accessing database:
http://www.homeandlearn.co.uk/net/nets12p4.html

hericles 289 Master Poster Featured Poster

Where are you calling the web service in the aspx page? Is it possible it is either in the page_load function or being repeatedly called by the page_load?

hericles 289 Master Poster Featured Poster

Is this the line where you expect the scope identity tone displayed?

cmd.Parameters["@Identity"].Value = scopeIdentityReportLabel.Text;

Here you are setting a command parameter to be equal to that text box value. Seeing as you have already executed the cmd object I'm guessing this is in the wrong place.

hericles 289 Master Poster Featured Poster

Is line 62 complete? You haves VALUES but nothing after it.

hericles 289 Master Poster Featured Poster

Unless I'm mistaken you are trying to get 3 images to appear side by side. This is easy enough to achieve with CSS. Have you had difficulty with lining them up using CSS?

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

Simply reverse your loop. Set num1 to 9 and subtract from num1 in each loop. And change your loop criteria so it stops at zero.
That should be enough hints to help you:)

hericles 289 Master Poster Featured Poster

You might want to debug your code to see exactly where the problem occurs but I think it might be because you are opening 2 streams to the same file when the form loads. If you caught the exception you would probably see a message saying the file was already in use by another process.
I believe (but maybe wrong) that if you opened both with FileMode.ReadWrite the problem would fix itself.

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

You have the columns types specified as int in your command parameters but as varchar in your table definition. I think the SqlDbType should be varchar.

You could always change your catch bracket to give you the real reason for the failure.

catch(Exception ex) {
   insertReportLabel.Text = ex.Message();
}
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

Does setting the opacity back to 1 for the CSS of the image not help? It will be inheriting the wrapper styles so you need to set them back to normal.

hericles 289 Master Poster Featured Poster

Change your <center> tag to another <div> and in the CSS specify it a width (I'm guessing 950px) and then use margin: 0 auto o auto;
As long as a block element has a width specified and margin-left and margin-right set to auto the element will be centered.

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

I had a quick look at this tutorial and it should cover everything you need to know about using credentials in a web service to pass through user and and password and use the web service to get a result.

http://www.devx.com/codemag/Article/16762/1954

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

First question, have you debugged the code and checked strLoadSource has the correct information in it?

hericles 289 Master Poster Featured Poster

My guess is you have an error in the way you set up the menu. The list shouldn't disappear as you move the mouse down. Check the distance between the main menu and the pop up menu. You probably have a slight gap of a pixel or two and as the mouse moves into that gap the menu disappears because you are no longer hovering over it.
You don't need to build in a delay for that, you just need to tweak the CSS and find the error.

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

We can't tell you your errors when we don't know what you have tried. And, besides that, the growing area of SEO is too complex to cover here. There are plenty of sites around now that explain the basics and how to implement your own SEO strategies. But make sure you know the difference between black hat and white hat techniques and steer clear of the black hat stuff.

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

There is no MySQL version for .Net. I think you are looking for the .Net connector for MySQL (component that allows .net to talk to MySQL). That can be found here:
http://dev.mysql.com/downloads/connector/net/

The connector is added to your .Net project as a reference and in your class you import MySQL.Data.Client to access it.

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

I'm not sure about taking control of your server from an SQL injection attack but you can easily lose your database. I can't remember the exact SQL code but I have seen scripts that can ascertain table names from the system tables. If you allow SQL injection attacks hackers can bypass your logins, pull out all the data, make all your data disappear, etc.

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

Hey,
For the logging off/back button issue, are you using session state to record the user's logged in status? if yes, when they logout clear the session. Then if they go back your page should check (if you have coded it to do so) if the user is still logged in or not with the session and deny them.

Question 2, client side gets fired first but you may want to use validation controls to check for valid input. These fire before the page is posted back and if the textbox is empty, input is incorrect, etc postback stops and a message can be presented to the user.

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

The substring function lets you specify a start point in the string and how many characters to take from that point. So to take the first 8 characters of a string would be:

string smallString = longString.subString(0,8)

Left and right accept the string and the number of characters to take as parameters. Mid takes the string, the start position and the number of characters to take. E.g.
Dim s As String
s = Left(s, length)
s = Mid(s, start, length)
s = Right(s, length)

hericles 289 Master Poster Featured Poster

In that case you defineitely want to use AJAX. Which is pretty easy in ASP.Net.
Go here http://www.asp.net/ajax and download the AJAX tool kit. Add it as a reference to your projectand you will see extra options appear in the IDE tool kit.

Basically you add an AJAX manager to the page and define which part of the page is going to use AJAX by placing a template control around the correct controls. The webiste above has tutorials that will step you through it.

hericles 289 Master Poster Featured Poster

If you want to code an app that retrieves mail from Yahoo you will need toget used to their API. Head over to http://developer.yahoo.com/mail/ and start reading:)

hericles 289 Master Poster Featured Poster

Without a postback means you will need to use AJAX. You say "is there any way to accomplish this is asp". Do you mean in ASP (active server pages) or are you using .net and you meant asap?

hericles 289 Master Poster Featured Poster

There is no code to create a breakpoint. In the VS IDE click in the left margin beside the line you want to check (a red dot will appear) and then start your app in debug mode. The code will run until it reaches that point and then open up the various debug windows. The vaules of your variables will be shown.
Check the values in the dataReader.

hericles 289 Master Poster Featured Poster

Instead of ApplicationPath try Server.MapPath. This will give the location relative to the server files (within IIS or whatever server you are using) instead of the location of the files on disc ,which is what ApplicationPath is giving you.
Server.MapPath will give the location from localhost, instead of from the C drive.

hericles 289 Master Poster Featured Poster

Not sure if your second post was sarcasm or not but...
Have you set the InsertCommand property of your CommandBuilder? I can't see it here.

daTest.InsertCommand = cb.GetInsertCommand()
hericles 289 Master Poster Featured Poster

You have just asked us for a LOT of help and, to be honest, this is pretty ambitious for your first web app. If you really want to proceed with this break it down into its component parts.
Pick one part (registration or creating the auction maybe) scope it out, plan your work and begin. Once you hit a real problem in a particular aspect of the development let us know. We'll help you with that.

mani-hellboy commented: fine reply +0