hericles 289 Master Poster Featured Poster

You won't be able to use SMTP to send an SMS, it isn't the correct protocol. SMTP only handles emails. You will need to find and implement an SMS gateway provider.

hericles 289 Master Poster Featured Poster

There are two ways of doing it. You can add the variable to a session variable:

Session["variable"] = some variable

and then retrieve it in the page load of the next page.

variable = Session["variable"].ToString();

Or you can use POST or GET to include it in the request to the new page and then use the query string to extract it. Both are easy to implement.

hericles 289 Master Poster Featured Poster

He just thinks they have no value. In every interview I haven been on my MCAD has generated conversation and been well received. But, maybe these aren't really companies I would want to work for...

hericles 289 Master Poster Featured Poster

Your code isn't running on the server? Then where is it and what server do you want to get the time from?

hericles 289 Master Poster Featured Poster

Yep, SELECT DISTINCT will provide you with a list of the unique values in the table. Records that are in the table twice or more will only be in the resulting dataset once.

hericles 289 Master Poster Featured Poster

Oddly enough you have the correct the code to make the lblWarning not visible, yet for the list you have coded lstCity.Visible = Not lstCity.Visible.
try:

lstCity.Visible = false

You never seem to sent toZone, only fromZone, so your check to see if they match can never match. And you have an error in your code:

If (fromZone = toZone) Then
ticketPrice = 250
Else
ticketPrice = 400
End If

You need to use == to check for equality. fromZone = toZone simply sets fromZone to be equal to toZone. It doesn't check if they are the same, it makes them the same.

hericles 289 Master Poster Featured Poster

System.DateTime.Now().
This returns the current time of the machine.

hericles 289 Master Poster Featured Poster

Does that answer your question? ;)
I have found that the answer is no, networking requires a different set of skills to programming. Knowledge of one might help you with the other to some degree but generally speaking there is no real cross over. Thats my opinion anyway.

hericles 289 Master Poster Featured Poster

Well,the error is saying it a nullException meaning your secondForm is empty or hasn't been loaded with anything.
This is probably because you are trying to match it with elements on the page called "form2". Are you sure they exist on the target page?

hericles 289 Master Poster Featured Poster

Mark as solved:)

hericles 289 Master Poster Featured Poster

Check your other post that relates to this exact same question. I put an example SQL check constraint there.

hericles 289 Master Poster Featured Poster

DataSets are fine, they are just a container for dataTables so the technique is the same.

It seems a bit wasteful to select all of the customers and hold them in a dataTable just to insert a new row. You could always just do an SQL insert command right at the start.

When you say you have to restart the application is it crashing with an error, just turning off or do you need to restart it to make it start processing again (it doesn't turn off but seems to stop working).

hericles 289 Master Poster Featured Poster

OK,I see what you mean. If you used steganography to make the encrypted data part of a large image or a boring text file then the man in the middle would have no interest in looking for the encrypted stuff. They would need to know before hand that there was encrypted date or they really are just taking a gamble.

hericles 289 Master Poster Featured Poster

You use the validators at the client end, either the win form or the web page.
Say you have a textbox that the user enters a number in. You apply a RangeValidator to the textbox which, when the button to insert the data is clicked, checks the value in the textbox is within the specified range. If not,processing stops.
If you want to do the validation in the database you can set up check constraints on the column. Here is a sample table definition that restricts a column to positive numbers:

CREATE TABLE Persons
(
P_Id int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Address varchar(255),
City varchar(255),
CHECK (P_Id>0)
)

Hope that helps,

hericles 289 Master Poster Featured Poster

I don't think many universities actually teach encryption as part of computers science. Its like computer security in general, I'm not sure why...
There are plenty of books on encryption techniques out there. I'd head over to Amazon and see what they have

hericles 289 Master Poster Featured Poster

From a experience point of view possibly but employers still value them on a CV

hericles 289 Master Poster Featured Poster

Sorry, is that code meant to simply insert the data the user entered in the text boxes into the database?

For the second part of your question you need to use SQL to run a SELECT statement on the database, pulling out the record of one customer I assume, and storing that in another dataTable. There you can access the cols of the dataTable to put data in the textboxs.
TextBox1.Text = dataTable.Rows[0][0].ToString()
TextBox2.Text = dataTable.Rows[0][1].ToString()... etc

hericles 289 Master Poster Featured Poster

I can't actually see where you use the entered hours of labour. You use the constant version here:

SubTotalDecimal = PartsDecimal + HOURS_OF_LABOR_Decimal

And later you have this:

ElseIf HOURS_OF_LABOR_Decimal > 0 Then

The whole idea of a constant is just that - it never changes. So having a test to see if it is over a certain value is really quite pointless.

And then you have this:

HoursOfLaborTextBox.Text = HOURS_OF_LABOR_Decimal.ToString("C")

You never seem to use the HoursofLaborDecimal you set up, except to increment by one during the pointless constant check I pointed out above. I think you confused yourself by having a constant and a variable so closely named.

hericles 289 Master Poster Featured Poster

negative values I believe. He's used the electrical shorthand.
In your front end add a RangeValidator to the control where the numbers are entered and set the minimum value to 0.

hericles 289 Master Poster Featured Poster

If you don't secure the end points of the transmission (via SSL or something similar) then a man in the middle can always find a way to access the packets.
Steganography is just encryption with another name. If you don't want people to be able to see the packets use SSL. If you are confident in your encryption algorithm, don't.

hericles 289 Master Poster Featured Poster

Hi,
You can use a GridView, ListView or a repeater control (for HTML) to do this. They can all be bound to the data extracted from the database. I normally extract the data into a dataTable and use the DataSource = dataTable method of the Grid,List or Repeater to connect the two.

The GridView is probably the easiest.

hericles 289 Master Poster Featured Poster

In text the power sign is normally given by the ^ character (above your 6 on the keyboard. E.g. 10^2 = 100.
Using a word processor the 2 would generally be turned into superscript which places it above the other characters and smaller.
In HTML you can use the <sup></sup> tag or use a CSS class.

Is that what you are after?

hericles 289 Master Poster Featured Poster

You would like to know more about this particular code in particular or cryptography in general? You can find plenty of articles on cryptography online but the maths involved in high level decryption can be daunting.

And, if you want to know about this code, are you expecting us to break it first???? You didn't even give us a link to the contest. There isn't much any of us can tell you just by looking at it.

hericles 289 Master Poster Featured Poster

Wow, hope you find it

hericles 289 Master Poster Featured Poster

You only set your bool value to false If Convert.ToString(objSheet.Cells(excelRow, 1).value) == ""
and never at any other point. In other words your loop runs and runs and runs if that bool is not false (which it won't ever be if it isn't the first time). you end up running out of memory.

hericles 289 Master Poster Featured Poster

Hi,
I'm hoping someone here can give me some insight. I'm looking to do some more Microsoft accreditation and am looking at exam 70-342. There are 2 main books on the topic:
Mcts Self paced training kit - the official MS press book and
The real MCTS Sql Server 2008 exam prep it

I've read disturbing things about both of them (poor choice of subject questions, plain wrong and incorrect material, doesn't cover the right topics) and wonder if anyone has personal experience with either or both of them. I've used the MS press books for other exams and found them lacking compared to the exam cram series which I thought were excellent.

Anybody used these books to study (and pass) the exams?

Thanks

hericles 289 Master Poster Featured Poster

You control this kind of thing in the web.config file. Locate the customErrors section and there is the ability to add the location of your custom page and specify what error it shows for (404, general exceptions, etc).
Google .net customerrors and you should find something. OK, I just did it for you:
http://msdn.microsoft.com/en-us/library/h0hfz6fc(v=vs.71).aspx

hericles 289 Master Poster Featured Poster

You have most likely created a event in your page code behind but failed to link it to your code behind. It is pretty easy to do in the designer.
For example you might have added a button so it will have

onclick="Button1_Click"

as part of its markup but no matching

public void Button1_Click() {}

method described in your code behind. Either implement the method or remove the call from your page HTML.

I hope that helps,

hericles 289 Master Poster Featured Poster

Not sure, out of interest I looked into but couldn't see anything. My advice would be not to. Its the online equivalent of a store attendant asking if they can help with anything. Very annoying and 99% of your users are going to make closing it the first thing they do on your site.

hericles 289 Master Poster Featured Poster

Are you referring to using CSS to style the location of the button?

hericles 289 Master Poster Featured Poster

Not without seeing some code...

hericles 289 Master Poster Featured Poster

Greek people must like exclamation marks!!!! Just kidding :)
Are you asking for help because you are having trouble with part of it or do you not know how to begin?

hericles 289 Master Poster Featured Poster

What trouble are you having?
From what I did see you don't really understand database connections and dataAapters. You set the connection string at the start of your class and then, for some reason, after opening the connection decide to set the connection object again.
Which is doubly pointless because you are using a dataAdapter which opens and closes its own connections anyway.

hericles 289 Master Poster Featured Poster

I think that is because all you are doing is subtracting 32 of KeyAscii. You're not doing anything with KeyAscii after that, remember it is just a variable you defined. You actually need to take that converted character and append it to the characters in the text box.

Rather, if your exclusion code is working and the text box only accepts letters and numbers, why don't you just use toUpper() to convert the string to uppercase?

hericles 289 Master Poster Featured Poster

By isn't karth saying that values are getting stored twice? His problem, as I read it, isn't getting double values returned but getting repeat values inserted.

hericles 289 Master Poster Featured Poster

It can be done, unfortunately I'm not an expert on it so my help is limited. You need to use the .Net reflection class. You can use this to examine a dll or class at runtime and from there call the right method.
I'm sure Google can supply tutorials now that you know what to look for.

I hope that helps,

hericles 289 Master Poster Featured Poster

Is "cannot find table" the exact error message you are getting? Because at the point you stay you are getting the error (opening the connection) it shouldn't be locating a particular table it should be attempting to connect to the database.

hericles 289 Master Poster Featured Poster

I think books are much better than online tutorials. If you afford the cash look on ebay or amazon for some of the MCP or MACD exam books for .Net. They are used to study for the MCP exams obviously and they are very good are getting you beyond the basics.
You'll never find a tutorial that goes beyond teaching you one particular .net technique. The scope is too big.

hericles 289 Master Poster Featured Poster

Are you giving the full file name (e.g. info.db) or literally as you have it here - Data Source=C:\\database\\info?

hericles 289 Master Poster Featured Poster

I'm not sure about this, and could easily be wrong, but I thought Google could read and crawl a javascript link but no weight was given to the link as it wasn't permanenton the page. As far as google's algorithm goes a javascript link doesn't provide a real indication of value.
But that is just what I've read and its easy to find another article that says something different.

hericles 289 Master Poster Featured Poster

Post up your code. I doubt anyone on here wants to take blind stabs at what could be wrong.

hericles 289 Master Poster Featured Poster

OK, you'll have a database of course that contains the user name and passwords. You'll need to connect to that.
On your page you have the textboxes for user name and password and the login button.
The code for the button takes the user name and password and constructs an SQL statement that queries how many rows match with that user name/password combo (the correct answer is 1 or 0).
If 1 row is returned user can be logged in, set a session variable to true to indicate user is logged in. If rows returned equals 0, user was not found, session variable stays as false and the user gets to try again.
Thats it in a nutshell, with no code supplied. Have a go, do what you can and if you get stuck post your code up here.

hericles 289 Master Poster Featured Poster

I've used hidden fields on the page to do this. Others may have a better way but this has worked OK for me before. Include a label as a hidden field on the page and write the variable into it using javascript.
Your .Net code can then read from the label, obtaining the variable.

hericles 289 Master Poster Featured Poster

He has left out the initial declaration of the command object and the data reader. Add this:

Dim cmd As New SqlCommand()
cmd = New SqlCommand(str_query, Conn)
Dim dr As New DataReader()
dr = cmd.ExecuteReader
hericles 289 Master Poster Featured Poster

Thats c# (i'm always making that mistake)...
I'll post something more complete in a couple of hours. I'm going to assume your database is set up with a table of teams, a table of players and a table that links the two. I hope thats accurate.

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

I'd would definitely include a try/catch block around your code; it may provide you with what is going wrong. There isn't anything in your code that should cause it to hang. It should work or give an error message. I would follow Fruit_alchemist's advice about putting user input directly into the command object. SQL injection is a nasty way to get your data deleted.
Also, debug your code and go through it line by line. That way you'll get a good idea of where it is catching.

hericles 289 Master Poster Featured Poster

You have the basic elements in place. Are you getting any error messages?

hericles 289 Master Poster Featured Poster
hericles 289 Master Poster Featured Poster

Is the next page static (the url is always the same)? If yes, then wrap the image in an anchor tag. Other use an imageButton.