hericles 289 Master Poster Featured Poster

You mean using cookies to store your login info for the site? SO you can go back to that site at any time and not have to log in?
If you want the browser to go directly to that page when you reopen it (the browser) thats something else entirely. You're wanting to make your browser keep track of open sessions on websites. I doubt thats easily possible.

hericles 289 Master Poster Featured Poster

Try this code:
DATE_FORMAT(date,format)

So your code would look like DATE_FORMAT(date, '%d-%m-%Y')

You can read more here: http://www.w3schools.com/sql/func_date_format.asp

Hope that helps,

hericles 289 Master Poster Featured Poster

With something like this:

DataRow newRow = dataSet1.Tables["Customers"].NewRow();

newRow["CustomerID"] = "ALFKI";
newRow["CompanyName"] = "Alfreds Futterkiste";

dataSet1.Tables["Customers"].Rows.Add(newRow);

You add a dataRow to the existing dataTable and then specify what data you want to put in the columns. If you don't have columns specified like the example above you need to create the actual columns too (really only useful if you are creating the dataTable from scratch). If you have populated the dataTable from any type of data source the columns should be named.

hericles 289 Master Poster Featured Poster

Well, I'm not sure what you expect us to do. We don't have access to the files and you haven't posted up any code. The first error is quite specific however - open the file and find the validation errors.

hericles 289 Master Poster Featured Poster

The server will have a default connection size. Depending on how you are hosting the site there are various ways to alter it. If you have access to a cpanel for your host you would probably be able to find it there. If you are hosting it yourself it will be in a config somewhere.

hericles 289 Master Poster Featured Poster

How many active connections have you got specified. I would think increasing the size of the connection pool would help.
Also, checking that the open connections are used as efficiently as possible; you want them returned to the pool the instant they are free.

hericles 289 Master Poster Featured Poster

In the onTextChanged event of the first text box (or all of them if you want to be really user friendly) split the string into 4 substrings, each 4 characters long. Then just paste each substring into the right text box.
I wouldn't use the return key as a 'move backward' command. It isn't very obvious. I'd expect the return key to move the cursor forward if not submit the form. Code up the backspace key event so that if the length of the text box is zero and the backspace is pressed, focus moves to the previous text box.

hericles 289 Master Poster Featured Poster

What exactly are you having trouble with?
All you need to do is query the database for the email entered and see if it returns 0 or 1 (0 = not in database, 1 = email exists).
If you have already coded part of the problem show it here and we can direct you on what you are missing.

hericles 289 Master Poster Featured Poster

Yes, you do use javascript - assuming the thefpl.co.uk URL in your image is your site. You have what looks like Google Analytics code but you have it in the header. It normally goes at the bottom of the page, right before the <?html>. I'm not sure if incorrect placement causes an error though.

Below that, unless I'm on the wrong site, you have _postback javascript too.

hericles 289 Master Poster Featured Poster

How accurate do you need it to be? You could break both strings into their separate elements and then match each one but that may not be very useful. If the user puts in an extra space but everything after that is OK, the match would report everything after the extra space as an error.
You could break each string at the space character and then match the characters of each word - then errors don't persist onto the next word...

hericles 289 Master Poster Featured Poster

What controls are you using and what have you done so far?

hericles 289 Master Poster Featured Poster

Ask Google and you shall receive:
http://www.dotnetperls.com/treeview - simple tutorial which explains what you need

hericles 289 Master Poster Featured Poster

If you only return one row (and will only ever return one row) why don't you just use an image and label? That's about as simple as it can get.

hericles 289 Master Poster Featured Poster

Store the first input in a variable when the button is clicked and then disable the button. In the onTtextChanged function of the textbox check all new input and if it matches the saved variable do nothing, else re-enable (or make visible - enable is better) the button.

hericles 289 Master Poster Featured Poster

For a start you are using INSERT when you say you want to UPDATE. Insert puts a new row in the database table whereas UPDATE finds the current value and replaces it.
And you don't seem to be calling the command on the database at all either. Yo haven't posted up a COMMAND.executeNonQuery() at any rate.

hericles 289 Master Poster Featured Poster

so you don't use AJAX at all? No analytics included?
I don't actually see an attachment here...
I just checked trade4traget.com, is that your site? Because there is javascript used on that page, including analytics. Table based layout too... haven't seen that for a while:)

hericles 289 Master Poster Featured Poster

Hi,
Use a switch statement to move to the correct option based on the user input (1-5)

switch (input)
{
    case 1: 
        // add address
        break;
    case 2:
        // remove address
        break;
    case 3:
    etc...
}
hericles 289 Master Poster Featured Poster

Is this code after you open the connection because I can't even see a connection open or close here.

hericles 289 Master Poster Featured Poster

If you go back and check your variable declaration you have email declared as a double when it should be a string.

hericles 289 Master Poster Featured Poster

How good is your regular expressions? Because that level of parsing is going to require some decent skills

hericles 289 Master Poster Featured Poster

OK, MSDN says you can set the ProhibitDTD property to false and pass through the settings yourself to the create() method. Also the create() method can accept nothing as the settings.
So, if you set
settings.ProhibitDtd = false

and then pass the settings into the create() method - which doesn't require a change to your code - it might work. You can read more (but not much) here:
http://msdn.microsoft.com/en-us/library/system.xml.xmlreadersettings.prohibitdtd.aspx

Hope that helps, I want to know what fixes it now too:)

hericles 289 Master Poster Featured Poster

What version of VS are you using? i only ask because the ProhibitDtd method is obsolete according to MSDN. There isn't any DTD declarations in your XML are there? The sample you posted up didn't include any DTD schema.

hericles 289 Master Poster Featured Poster

OMG, I gave you C# code for a VB.net project... Sorry about that. I only just noticed what language you were using.

Dim settings As New XmlReaderSettings()
settings.ValidationType = ValidationType.Schema

That will most likely fix your problem.

hericles 289 Master Poster Featured Poster

try this:
Process.Start("C:\Windows\Explorer.exe", "your image location")

hericles 289 Master Poster Featured Poster

You have altered the code I posted up from this:

XmlReaderSettings settings = new XmlReaderSettings();

to this:

XmlReaderSettings (settings = new XmlReaderSettings());

Remove the brackets around the settings and it should work.

hericles 289 Master Poster Featured Poster

Connection object, thats what I said back at the start;)
You don't have .text added to SubItems(5) like you do the others and, of course, you have conn.Open commented out...
What is in lvLogs exactly. Because are treating the individual items as if they are command objects.

hericles 289 Master Poster Featured Poster

try creating your settings rather than using new:

XmlReaderSettings settings = new XmlReaderSettings();
settings.ValidationType = ValidationType.Schema;

xmlFile = XmlReader.Create("sample1.xml", settings)

See if that helps.

hericles 289 Master Poster Featured Poster

Is the error coming from the ConnectDatabase() method? I wonder that because you don't pass the method the connection object and it isn't declared in the method. The method maybe in the same class as the connection object though, I can't tell.

You can always debug your code and find where the error is coming from.

hericles 289 Master Poster Featured Poster

I'd check the values you are getting out of the data set (name, telephone, email) and confirm they aren't empty strings.

hericles 289 Master Poster Featured Poster

You are calling an insert operation on the data in the texbox - thats inserting into one row of the database (creating a new row as it is an insert, not an update) and then later you are calling the update on your data adapter. The updater is only updating the information it holds which I strongly doubt is the information you just inserted by itself. Does that make sense? You are adding data that does not exist in the data adapter, therefore the adapter can't update it

hericles 289 Master Poster Featured Poster

I'd use a dataAdapter to pull out the information and a dataTable to hold it. Must easier to work with and insert to the email. Probably faster execution than a data reader too.

hericles 289 Master Poster Featured Poster

Are you referring to seeing the pages in the browser history and cache or the ability to move backward through visited pages by pressing the back button? Sorry, I'm not sure exactly where the unauthorized user would see the pages.

hericles 289 Master Poster Featured Poster

You are using HTML email for this? Because if yes, the formatting is reasonably easy. Use a table and some CSS in-line styling.

hericles 289 Master Poster Featured Poster

In your code you have this line:

if (cn.State == ConnectionState.Closed)

but I can't see a section where you continue if the cn.State is open. Depending on whether you handled any other opening/closing of that connection you may have a problem (the two functions here look OK but you may have other code that leaves the connection open elsewhere).

Also, you are selecting all from the database where user name and password matches but then, when checking if the data reader has rows you are running the same check again:

if ((rdr.GetString(1) == this.tbx_user.Text) && (rdr.GetString(2) == this.tbx_pwd.Text))

This seems unnecessary as the reader can only contain rows if the user name/password have already been matched.

hericles 289 Master Poster Featured Poster

I'd go for WPF too. My knowledge is pretty basic at this stage, I haven't devoted the time to learn it but the ability to really make the UI look how you want is a big plus. Winforms are pretty basic in comparsion.

hericles 289 Master Poster Featured Poster

You will need to be careful where you use the findControl though. If you are using it in Page_Load expect difficulties as the control may not have been created yet. I had this problem once and I had to force the control to load before using findControl. Just FYI.

hericles 289 Master Poster Featured Poster

you will need a textbox and file upload control there somewhere if you intend to upload files. I guess you can use a listbox to show the data after the save operation has completed but a listbox isn't really the best way to get the user to enter the data initially.
I would have the file upload control and an add button. The user selects the file they want to upload and clicks add. The data is shown in your list box or a repeater or something similar and the user repeats the opertaion until all the files they want to upload are listed.
They then click save and the file upload and database saving operations take place, drawing the information out of whatever data structure you stored it in.

hericles 289 Master Poster Featured Poster

Really? Store the current total as a variable. Add the value of the textbox to it and then output the new total to the textbox. If you're having trouble keeping the current total persisting (you don't mention if this is a webpage or not) use session state or a hidden variable as part of the page.

hericles 289 Master Poster Featured Poster

A datagrid can be bound to an XML data source. It will automatically pull through all of the data, the number of columns and the column names, etc and display it on the page.

hericles 289 Master Poster Featured Poster

Um, yes. That is what the .Net part of the name means. Do you know .Net at all, played with a copy of Visual Studio?
Open up google and type in asp.net tutorial. You'll find all the help you need.

hericles 289 Master Poster Featured Poster

Create a connection object with a valid connection string, and command object. Link the two and set your sql statement. open the connection, execute the query on the command object and close the connection. Like this:

Dim conn As New MysqlConnection('valid connection string')
Dim cmd As New MySqlCommand()
cmd.connection = conn
cmd.commandText = 'your sql statement'
cmd.commandType = commandType.Text
conn.Open()
cmd.ExecuteNonQuery()   or executeScalar etc
conn.Close()
hericles 289 Master Poster Featured Poster

get practice with string manipulation and regular expressions, you're going to need them a lot. You will need to open the css file as a stream, locate the id or class you want to edit or delete and make the changes to the stream or locate the place where you want to insert the new css code.
It is definitely possible but I'm guessing it will be reasonably complex.

hericles 289 Master Poster Featured Poster

The easiest way to display the image would be to have a complete set of images that are each an increment of the previous one. e.g. head, then head and body, then head, body and one arm, etc. Then you just need to display one image or another to show the hangman.

On the button press for a letter check the char array (or string) that is the correct word and check for the letter's location (remember to code this so it finds ALL instances of the letter not just the first). Then on your result label (which probably starts off as a collection of underscores or similar) add the letter into the correct place.

hericles 289 Master Poster Featured Poster

How can you update date that isn't in the database? Insert then update is probably better, assuming you aren't updating the information you just inserted because that doesn't make much sense (you'd just insert correctly the first time right??).

In the posted code you have a mistake on line 4, you're missing a comma after company_financial.

hericles 289 Master Poster Featured Poster

You will need to add roles (unless that is what the type column already does) to your user database, admin, user, guest, etc. Then when a user logs in you check the role and apply the appropriate permissions to the menus.

hericles 289 Master Poster Featured Poster

I take it the user enters the data, possibly including file locations for images? Or is it presented to them by the website and the user is confirming a selection? If you explained exactly what you were trying to achieve we might be able to provide good advice.

hericles 289 Master Poster Featured Poster

Don't disable the back button unless you have a really good reason. Seeing as you seem to be doing it on the logout page, you can achieve the same effect through session state. If session state says user is logged out (you update it when they do log out) when they go to a page that requires log in status, they get redirected to the login page.

hericles 289 Master Poster Featured Poster

wow, big question. Do you really expect one of us to hand you everything you need to do that?
What have you done so far and do you need help with the database, the printing, the interface, etc?

hericles 289 Master Poster Featured Poster

What exactly do you mean by unique ID? Seeing you mention creating a record are you referring to when you insert the data in a database? As these are sub classes and inherit methods from the super class, any code that guarantees uniqueness should be handled in the super class.

hericles 289 Master Poster Featured Poster

A SQL connection string normally looks like this:
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

I'm guessing you're failing at the point of opening the connection because the connection string is incorrect. You could always handle the exception to see what is really going on.