hericles 289 Master Poster Featured Poster

But your image in the screenshot is a gradient... If you have photoshop its pretty easy. Only online tutorial will teach you how in a couple of minutes. If you don't have photoshop I would suggest the the Gimp, its an open source graphics package and a pretty good one.

hericles 289 Master Poster Featured Poster

You can check the jQuery site for known issues with browsers and operating systems but those guys work pretty hard to make sure there aren't many major browser compatibility issues.

hericles 289 Master Poster Featured Poster

Please, if you get an error post it up...

hericles 289 Master Poster Featured Poster

without seeing code it could be absolutely anything. You need to help us out if you want us to help you.
But as a possible guess, does the link use any variables to build up its URL? Something that might not survive the page refresh and so isn't available the second time around?

hericles 289 Master Poster Featured Poster

Everyone's code here is ok from a login point but they all include the textbox text directly in the SQL statement. That is bad, it allows for SQL injection attacks. In the interests of becoming a better code get used to using the parameters of the command object to encapsulate the inputs

MySqlCommand cmd = new MySqlCommand();
cmd.Parameters.Add("?userName", MySqlDataType.Varchar);
cmd.Parameters["?userName"].Value = Textbox1.Text;

Repeat that for the password textbox. It prevents users from slipping in SQL code that can subvert your security.

hericles 289 Master Poster Featured Poster

You want the entire image, covering the whole page, got it. Seeing as it is a gradient you will need to create a gradient image that is taller than the page is (including high resolution screens) but only 10 or 20px wide. Then use the background-repeat: repeat-x to make it run across the page.
You're gradient would have be perfectly vertical too, only sideways blending will ruin the effect.

hericles 289 Master Poster Featured Poster

OK, you need to explain what you need. Fist you didn't want it repeated, now showing once isn't enough. Is this image meant to be a banner background across the top of the page? If yes use the repeat-x code line I mentioned before.
If not please explain how it is meant to look.

hericles 289 Master Poster Featured Poster

Look into setting up cron jobs or scheduled tasks on your server. For a web page you can set a scheduled task to run at certain times, calling the web page and thereby running any scripts that are part of the page.
If you are coding a program to run on your computer, look at making a windows service which can be called at set times.

hericles 289 Master Poster Featured Poster

What do you mean by the image was hanging? Can you attach a screenshot?

hericles 289 Master Poster Featured Poster

Use background-repeat: no-repeat;

or if you want it to repeat along one axis
background-repeat: repeat-x
background-repeat: repeat-y

hericles 289 Master Poster Featured Poster

For x As Integer = 1 To dsdg44.Rows.Count - 1
if dsdg44.Rows(x,1).ToString() == teamStr Then
// rank is now equal to dsdg44.Rows(x,0).ToString();
x = dsdg44.Rows.Count; // finish the loop rather than continue
}
Next

hericles 289 Master Poster Featured Poster

Use a loop to run through checking the dataset's 2nd col for the name, when a match is found get that rows first column.

Dim teamStr as String
teamStr = comboBox value
for(int x = 0; x < dsdg44.Rows.Count; x++) {
   if(dsdg44.Rows[x][1].ToString == teamStr) {
       // rank is now equal to dsdg44.Rows[x][0].ToString();
       x = dsdg44.Rows.Count; // finish the loop rather than continue 
   }
}

Thats c# code - I did it again, wrong code for the forum. Anyway, it's easy to switch back to VB. But that will run through the rows in the dataset checking the second column for the specified name and, once found, get the rank from the first column.
Hope that helps,

hericles 289 Master Poster Featured Poster

I figured it is date but there a lot of different formats that get covered by that. Your SQL database is most likely storing the date with a time element as part of it unless you have specifically formatted the data not too.
If you can open up the SQL server control panel or command prompt and type in the SQL statement you are using and see if it works there, or select the date column out to see exactly what the values look like.
I got frustrated once because I was trying to find the date as dd/mm/yy when MySql had inserted it as yy/mm/dd:hh:mm:ss (even though the hours, minutes and seconds were all zeros).

hericles 289 Master Poster Featured Poster

I would check the format of the datetimepicker value against the format in the column for the database. The SQL statement is probably not finding a match on that criteria.
You are also using checkBox1.Text in the SQL statement. Are you sure you don't want CheckBox1.Checked?

hericles 289 Master Poster Featured Poster

If you want to alter the way the results look on the page you can always include HTML in your literal control and apply CSS classes. Much easier than XSLT.
Or do you want to change the database output to XML?

hericles 289 Master Poster Featured Poster

Just so I'm clear you want to check the database to see if the IsDefault column has a 1 in it anywhere to see if the default has already been set for another name? Only one record in the table can be 1 the rest have to be 0?

hericles 289 Master Poster Featured Poster

Sorry, I knew doing it from memory would be rusty. Change

Dim node As XmlNodeList

to

Dim node As XmlNode
hericles 289 Master Poster Featured Poster

Are you using VS 2005? Because it is a known bug in that version. If possible you can try moving your build to a new folder. If you google the error for VS 2008 you will find other solutions ranging from deleting registry keys to increasing your memory page size. Moving the project to a new folder is also a suggested fix and is the easiest thing to try first.

hericles 289 Master Poster Featured Poster

Are you saying it calls the CheckBoxValidation twice? Because I can't see where that would happen. you only call the method with the True parameter.
As a point of coding design you replicate code in your IF statment that you don't need to. Apart from UpdateCMD inside of InsertCMD the two sections are the same. It would be better to do this:

SQLConn.Open()
trns = SQLConn.BeginTransaction
string messageStr
If bNewData Then
   InsertCMD()
   messageStr = "Record Saved Successfully"
Else 
   UpdateCMD()
   messageStr = "Record Updated Successfully"
End If
trns.Commit()
SQLConn.Close()
GetData()
bNewData = False
bEditData = False
Count()
MessageBox.Show(messageStr, "Save", MessageBoxButtons.OK, MessageBoxIcon.Information)
EnableControlsLoadMode(True)

Also your try block is quite long and you use the beginTransaction and commit immediately on either side of the insert or update commands. The problem here is that you still have potential causes of an exception being thrown in your try/catch block - namely GetData() and Count() - which would then hopelessly call the rollback() command. You've already committed by that point so its too late to roll back.

hericles 289 Master Poster Featured Poster

Can you post up the code around that line? An overflow is normally due to problems with recursive calls, maybe an infinite loop, that kind of thing. Although it finally crashed out trying to perform that operation the error is probably being caused else where.

hericles 289 Master Poster Featured Poster

You have multiple elements called Question and Diagnosis, some children of the other, which isn't good XML design.
I prefer using Xpath for XML but you would need to fix your naming clashes before it would work properly. In Xpath your query would look like this:

Dim node As XmlNodeList
node = xdata.SelectSingleNode("/Question[0]/Option")
string result = node.GetAttribute("value")

I think that will work, I did that from memory.

hericles 289 Master Poster Featured Poster

The .Net framework can use access database files (.mdb) without access being stalled so that are a possible solution. You might have to check if Jet is still installed on modern versions of Windows as I don't know if it is (windows 7 & 8).

Otherwise you can set up sql server as a dependency of your project so its installation is part of your installer. A good tutorial on creating msi's will include how to do that.

hericles 289 Master Poster Featured Poster

Set up your connection to the database and a command object with your SQL statement in it. Execute the command on the database, storing the result in a string, and then set the text box.text to the extracted value. So, pseudo code (assuming mySql):

MySqlConnection conn = new MySqlConnection(/connection string/);
MySqlCommand cmd = new mySqlCommand();
cmd.Connection = conn;
cmd.CommandText = your sql statement
conn.Open()
MySqlDataReader dr = cmd.executeReader();
conn.Close();
if(dr.hasRows) {
while(dr.Read()) {
    textbox.text = dr.getString(0);
}
}

And that should do it for you.

hericles 289 Master Poster Featured Poster

When you say you do not want the 'rest' to be visible what exactly is the rest? Extra rows from the database? Other controls on the screen? What?
If it is rows from the database simply alter your SQL statement to select only the rows you want instead of using *.

hericles 289 Master Poster Featured Poster

So you have used a dataAdapter to fill a dataTable. The items in the dataTable can be accessed using notation like this:

string sample = dt.Rows[0][1].ToString();

This is accessing the second element in the first row of the dataTable and storing it in a string variable. You can use column names rather than indexes if you prefer.

hericles 289 Master Poster Featured Poster

For things like comments and posts, which aren't actually files, you would simply store them in a database. For saving files you would want to set up a folder (or several) to house the files and then use a database to show what files are linked to which user. For this you would have a table that had the user id and the file name with maybe some other information. To make this work the files saved would have to have unique names of course so you would need to add some kind of unique identifier to the file name.
I hope that helps,

hericles 289 Master Poster Featured Poster

Of course it is. Are the textboxes populated from a database or are they using user input? If working from a database you simply perform the calculation at the same time you populate the textboxes.
If it is from user input and you don't want a button press to be required its a little trickier. You would need to code up something in the last textbox that performed the adding function - how well this would work would depend on the data (is there anyway to know when the user has fiinished entering the data in the tetxbox?).

hericles 289 Master Poster Featured Poster

Hi,
You can use a repeater control to do this. It has header, footer, item and alternatingItem templates that you can store the database info in.
First use a dataAdapter to populate a dataTable, then set the dataTable as the data source of the repeater control and dataBind it.

Then use your repeater in the aspx page to pull through the data:

<asp:repeater id="repeater1" runat="server">
  <itemTemplate>
    <tr>
       <td><%#Container.DataItem("columnName1")%></td>
       <td><%#Container.DataItem("columnName2")%></td>
    </tr>
  </itemTemplate>
</asp:repeater>

You can alternatingItemTemplate to use a different css class if you want to highlight the rows to make them stand out.

Hope that helps,

hericles 289 Master Poster Featured Poster

I think the problem lies here:

intValue = Convert.ToInt32(userInfo);
userInfo += intValue;

intValue has no value specified and you set userInfo to zero at the start. So you are really saying intValue = 0, userInfo += inValue (which is 0 += 0).
I think you should be using userInput not userInfo.

hericles 289 Master Poster Featured Poster

You're not using the data extracted in your datareader at all. You are setting up the connection and calling the executeReader method then leaping into the If statement. It is generating the error because you haven't entered "mobileno" and "password" into the two textboxes.

You need to check if the datareader has one row. If it does your SQL statement worked and the user can log in.

hericles 289 Master Poster Featured Poster

Most of us have objections to doing your homework for you. We will help you with parts of it and give advice but only after you've shown us you've made some effort. Right now you're asking us to do your assignment for you. Show us what you've done.

hericles 289 Master Poster Featured Poster

Well, you've got your factorial code already supplied in this answer. Thats the hard part done, now all you have to do is build the interface. What part are you having trouble with?

hericles 289 Master Poster Featured Poster

I see. Your SQL code has an INSERT statement in it...
In that case you want to use something like
string sql = "SELECT * FROM table_name WHERE some criteria";

Then execute your command and store the result in a string. Set the label text to the string value.

hericles 289 Master Poster Featured Poster

So you are trying to insert the text from the label into the database.
Change your code to this:

Dim SqlQuary = "INSERT INTO table_name VALUES(?label)"   // I'm not sure what //TVD refers to, is it the table name?
Dim Command As New MySqlCommand
Command.Connection = MySQLConnection
Command.CommandText = SqlQuary
Command.Parameters.Add("?label", MySqlDataType.Varchar);
Command.Parameters["?label"].Value = Label2.Text;
hericles 289 Master Poster Featured Poster

It doesn't look like you are considering the last name when sorting. If the names are already sorted by last name you should only be sorting the first names where the last names match.
For example if you have the names Phil Doe, Jane Doe, Fred Doe, Bill Doe, Jane Jones and Mary Jones, you shouldn't be comparing Phil with Mary to order them as the last names don't match.

hericles 289 Master Poster Featured Poster

So you want your alert box to be part of the page, not above it like the javascript alert box? You can do this by either including a div with the error message in your page and either:
- toggling it visibility will you want it to display

- initially placing it off screen through it x coordinates and moving it into the correct location when you want to display it.

This of course assuming a label with text won't suffice for what you need. For highlighting inputs that are required you can always use required field validators placed beside the input.

hericles 289 Master Poster Featured Poster

The old <marquee> tag is deprecated. You can use a javascript library like jquery to do it pretty easily. There is a demo of some of the things you can do here:
http://remysharp.com/demo/marquee.html

hericles 289 Master Poster Featured Poster

What have you done so far? Is it the SQL for the query you are having trouble with or the whole connection thing? For clarity, what is your table schema like? Are all three tables linked by the same foreign key?

hericles 289 Master Poster Featured Poster

For a start make things easier on yourself and check in your SQl for a user name AND password. Then you don't need to do the second check, if the query returns a row you know the credientials are OK.

Have you debugged your code? If you think an error is being thrown use a try/catch block to see what it is. It can remove a lot of the guess work even if you remove it later.

hericles 289 Master Poster Featured Poster

So, I guess you also have a textbox where the name is entered and a button to submit the search. In the button click function take the name entered into the textbox and make that part of your SQL query (SELECT patientName FROM tableName WHERE patientName LIKE '?name' - where ?name is the parameter).

Then return the rows from the database in a dataTable and bind the datatable to your combobox using the dataSource and dataBind functions.

hericles 289 Master Poster Featured Poster

Hi,
I have heard of source forge and github and the like but I was wondering if anyone knew of a site that listed open source projects looking for members - so definitely WIP instead of a released project.
I actually found just such site about 2 months ago, after a bit of googling, but didn't note the URL and now can't find it again.
Anybody know of anything?

hericles 289 Master Poster Featured Poster

Coders and sys admin need a good working knowledge of databases. But programmers will need more SQL query style knowledge and seldom need replication, back up, admin style knowledge of the database - thats what the sys admin is for.
Whereas sys admin may not need the same exact skills as a coder. But database knowledge is always useful in either of those jobs.

hericles 289 Master Poster Featured Poster

I think the question would be stronger if you defined it better. Data? What data? At its most basic level yes data is important but only when used by skilled people. Data left sitting on a hard drive is useless, as is data that is used incorrectly.
Human resources, along with any other department, need the correct data to function. Without it they are worthless.
Your question can be considered similar to: which is more important in a car - petrol or engine? One without the other is useless.

hericles 289 Master Poster Featured Poster

Hi,
What database to use depends on how much data you expect to store (although that is also not that important unless the amount of data is expected to be HUGE). You could save your data in text or XML if you wanted but there would be a reasonable performance hit as the files got longer.
SQL or MySQL should be perfectly adequate for your needs.

To save the data storage problem you could simply request the next question from the database as one is solved, then you're only holding one question in memory at a time. An obvious issue here would be if you wanted the questions to be in random order - you'd need to handle that somehow.

Or you could just extract all of the questions for the quiz and store them in a dataTable in memory (but out of the database) and access them in turn or randomly. This could potentially clog your server depending on the number of questions, concurrent number of users, etc.

I hope that helps,

hericles 289 Master Poster Featured Poster

I'm not sure why you listed all that code. The part relevant to your SQL operation would have been adequate. I gave up looking for it so I don't know for certain the answer to your question but I would assume you are trying to insert a value into a column that is marked as IDENTITY.
Option one (as the error message says) is to adjust your IDENTITY_INSERT to be ON or correct your SQL statement/table design so the error doesn't occur.

hericles 289 Master Poster Featured Poster

Your question is a bit hard to understand. if you are looking for a .Net control that can be used to display the records from a database on a webpage you can use a dataGridView or a Repeater control.

Is the problem with your control or your data request to the database (your SQL)?

hericles 289 Master Poster Featured Poster

Generally, if you are using a database the expiry date will be stored there. Without knowing more about what you want to achieve its hard to really help but, for example, if you were logging into a website and your password reset date was kept in the database, when you login code can check the current date vs the expiry date and alert you there is a week left, you're overdue, whatever.

hericles 289 Master Poster Featured Poster

There is a number of books on game programming for IOS (objective C) and Android devices. I know you want to use your VB.Net knowledge but those devices are probably going to be the mobile game platforms of the future.

hericles 289 Master Poster Featured Poster

In the listbox.selectedindexchanged() method select which item was selected with the items.selecteditem method and use that to populate the url for the image. If the item text isn't the image URL ( which is probably the case) store the URL in the value parameter of each list item and use that to set the image instead.

hericles 289 Master Poster Featured Poster

If the user control is simply javascript why can't you simply link to it as an external .js file? That will remove the error.