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

Could you be more specific?

hericles 289 Master Poster Featured Poster

Remove the comma after author1. It should read:

strsql = "delete book1, author1 from book_Load where Book_ID_no = '" & bkIDnum.Text & "'"
hericles 289 Master Poster Featured Poster

I must agree, I only found them after Chris mentioned them in a previous post and I've started to get through them. I knew objective C already (self taught to an adequate intermediate level) but I still learnt a lot about iOS stuff I thought I understood.

mani-hellboy commented: see rules and regulations -1
hericles 289 Master Poster Featured Poster

From what I can see here the error is occurring because the line that actually sets your cn variable to the real instance of the connection object is commented out. Without that line your cn variable is null.

'cn = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=TestDataBase.accdb;Persist Security Info=False;")
hericles 289 Master Poster Featured Poster

Why don't you make it easier on yourself and simply record the first day of the account activation? Then you just compare to that value in your code to see how much time is remaining if any. It saves you updating the record for every user every day just to decrease the days field.
The first time the user tries to log in and the date is 30 days past update the active/inactive field and inform the user.

hericles 289 Master Poster Featured Poster

OK but to record that kind of change to a task your are simply updating the record for the particular task. I'm not sure what you expect the code you included in your first post to do.
For example you are SELECTing the work record out of the database for the supervisor and manager to view and change. If the supervisor signs of on the work then the record is updated to reflect the change and probably the date signed off.

hericles 289 Master Poster Featured Poster

It looks like you are correctly accessing the JSON code as the data is appearing in your list view. Is your issue how to pass the data to another form?

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

Use the HttpUtility.UrlEncode(String) method. It will take the string and turn the special characters into URL compatible code.

hericles 289 Master Poster Featured Poster

What? Are you asking how to update one column to indicate that a particular task is 'done'?
Assuming the task has some ID value associated with it you can use:

UPDATE table_name SET column_name = value WHERE id_value = task_id;

Obviously I have used made up names as your table definition hasn't been provided.

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

That error means one of the variables is not set to an object. It will be uninitialised instead. In your case this means that one of the variables in the line:
Int32 TTList.IsItemReallyVisible(TTList*, CTreeItem*) :
is not set to anything. You will need to check where these variables get their values in the previous code and find what is going wrong.

hericles 289 Master Poster Featured Poster

Are you referring to the background image? You can place each as the background image in a separate div with the same width and set overflow: hidden. Then use some CSS to nudge the two divs tight against each other without padding and it should look seamless.

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

OK, is it indexed? Indexes can really help speed up large searches.

hericles 289 Master Poster Featured Poster

Maybe I'm not fully understanding the question but a list of all of the cities ordered by country could be done like this:

SELECT Country, City, Populations FROM Countries INNER JOIN Cities ON Countries.Short_code = Cities.Country_Short_Code ORDER BY Country, City

Assuming short_code and countries_short_code are the same thing in both tables.

hericles 289 Master Poster Featured Poster

Well, it is a paid service hence the license key. You could always purchase the software...

hericles 289 Master Poster Featured Poster

wrap a div around the entire page contents and in the CSS give it a width of 100% (so it fills the width of the screen). Then have a second div that specifies an actual width (how wide you want your content to be) and use the margin-left: auto; and margin-right: auto. This will center the inner div within the first. Place your content inside the second div.

<div id="page">
   <div id="container">
        your content goes here
   </div>
</div>

And your CSS:

#page {width: 100%;}
#container {
    width: 1024px; /* or whatever you need */
    margin-left: auto;
    margin-right:auto;
}

That should do the trick.

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

Your blog_id will need to be inserted, most probably from a variable that you have stored on the page. The name you give it is up to you. We were both just saying that your SQL statement was incorrect in including a WHERE clause.

hericles 289 Master Poster Featured Poster

You can't use a WHERE clause with an INSERT statement. You are inserting a new row so matching on a WHERE clause makes no sense. As a blog can have many comments searching in the comments table by blog_id isn't a good idea anyway (except for SELECT of course but you wouldn't want to do that with an UPDATE).

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

When you select your data from the database use a WHERE clause to specify only rows that have a matching value in a particular column.

SELECT * FROM table1 WHERE brand = 'Nokia';
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

Just curious, but is that all the checkbox does? Normally a checkbox is used to record the fact that some option has been chosen, not initiate another action. If you wanted to move the user to another window a button or link would do the same thing and actually inform the user more about what was to happen than a checkbox.
I know this is completely aside to your query but I'm curious from a UI point of view :)

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

If you want to go the IE 6/7 stylesheet way add this code to your page headers:

<!--[if lte IE 7]>
// add your link that points to the IE6 style sheet
<![endif]-->

This means if less than or equal to IE 7 then do this. These comments are only read by IE browsers.
If you can resolve the issue without using this it would be better though.

hericles 289 Master Poster Featured Poster

Hello,
You will need a combination of CSS and javascript to do. CSS to display the base image in the right location (i.e. top right but with no text included) and the javascript to accept the number and place it over the image.
The easiest solution is probably a single div with the image of the bubble set as the background image. Inside that you can write your number using a basic javascript function.

hericles 289 Master Poster Featured Poster

I think the OP was referring to parsing the user input and using some form of language syntax rules to build an SQL statement from the words entered. This is very difficult to do properly and I would be tempted to use the drop down list method suggested above. Maybe not as cool and a little clunky, but at least it is easily achievable.

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

You will want to use display: inline-block for the list items of the ul. This will make them line horizontally rather than the default vertical.

hericles 289 Master Poster Featured Poster

You can either store the image itself in the database (probably simpler code wise) or save the image to a directory and save the uri to the image in the database (this involves more code because you have to actually save the image but more efficient on your database).

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

If you hit the button again does is the value TEST0005 entered (i.e. it always increment by 2)? If it keeps repeating like that the code you use to increment the text box is probably getting called when the button is clicked. Do you have it in the page_load function by any chance?

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

I think it could be the position:static that is over riding your z-index element. W3C schools states that the position must be relative, absolute or fixed for z-index to work. I'm not sure how accurate that is as I've had issues with z-index not working but you might want to try it.

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

There is litJson but I haven't personally tried it. I think it is from .Net frame work 3.5 so its not too old. And there is the JavaScriptSerializer class introduced in 3.5 which is apparently OK (again, I haven't used it myself).

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

Is the number being allocated by the database? If yes then you can use transactions to lock the rows in the table being used until each user is finished with it. Transaction allow only one user at a time to access the information to prevent dirty reads and the like, sequent users queue awaiting their turn to access the database so problems like yours are resolved.

hericles 289 Master Poster Featured Poster

Absolute positioning can be a real headache, particulary with resizing the browser window. You should be able to use position: relative to position child elements within their parent with few problems. You will still get some movement between the browsers though.
Are you using a CSS browser reset to clear out all margins and paddings before you begin? That can help.

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.