1,576 Posted Topics
Re: You're going to step too far with this line: `command = New SqlCommand(Query.Text, mysqlconn).ExecuteNonQuery` Instead of setting up your command object and storing it in the command variable you are trying to place the result of exectuting the command there. Which can't be done of course, it's the wrong type. … | |
Re: If it crashes the app, break point it and debug line by line. Knowing exactly which line causes the crash usually makes solving it quite easy. | |
Re: This is hard to understand exactly what you want. You have, for example, the name and id listed in list boxes 1 and 2, like so: LB1 LB2 1 Adam 2 Tony 3 Dave 4 Lisa And then you want a third list box that gets the amount variable. Where … | |
Re: I don't remember having any issues between the Java SDK and JDK with .Net. I've had VS 2013 and 2015 on the same PC as the java dev tools, eclipse, netbeans and android studio without ever having a problem. Just set your Java environment variables correctly during setup and everything … | |
Re: That was popular in New Zealand about 2 years ago. The first couple of times I got called they always said it was 'Windows' calling about emails my computer was sending. They eventually realised that was incorrect and started saying they were Microsoft. Each time I told them I worked … | |
Re: You haven't mentioned what problem you are having. Does the PHP script work by itself when you test it? Does the AJAX request connect to it correctly? What exactly is the problem? Also, you would benefit from using something newer like jQuery. I haven't seen that XMLHttpRequest code in years. | |
Re: You create a range of variables: `double fed_tax = 0, state_tax = 0, hrswrk, payrate=0, gross_salary = 0; double hrlyrate=0;` But never change their values. For example, you get the user to enter a value for hrswrk but then times that by hrlyrate. 0 x anything = 0. All of … | |
Re: Seeing as you're inserting or updating one row at a time simply include to variables, one for updated, one for inserted, and increment each other the respective database operation. Once, you're done you have your two totals. If the update could affect more than one row in the database, the … | |
Re: So you don't want a static page at all. You want a template page that pulls through the data for the correct restaurant and displays it and styles the page. You need a basic HTML layout in the format you like, a database that can hold the information for each … | |
Re: Having just one line to look out a complete answer is impossible but the line of code gets the size of the account object, uses the static_cast method to convert it to an int (which it was already but is probably used to avoid any unsafe type issues). Then it's … | |
Re: Without more exact information as to the database schema I don't know what you want us to do. How can we write a query without knowing the tables names and structure? Also, show us what you've tried, that can help us help you. | |
Re: You can do it with a couple of SQL statements. First create your new tables if you haven't already then fill the cities table by doing: `INSERT INTO city(city_name) select distinct city from old_employee;` Then fill the new employee table by doing: INSERT INTO new_employee(first_name, last_name, city_id) SELECT e.first_name, e.last_name, … | |
Re: There isn't a special case with fingerprint templates at all. As @ryantroop tried to explain you're trying to compare two images as exactly the same when they won't be. This is a brief explanation of finger print scanning taken from the net: "When a computer checks your fingerprints, there obviously … | |
![]() | Re: File.ReadAllLines(Filename).Length() will give you how many lines are in the file. Then generate a random number with that as the upper bound and read the first column of that row. ![]() |
Re: Have you actually checked the connections details? That is the more likely cause of the problem. | |
Re: Limit 2 won't skip the first two IDs. It will mean the query only returns 2 rows. You do a subquery, selecting all IDs in ascending order limit 2 and then use the NOT IN selector to return the rest of the rows. Depending on the size of your table … | |
![]() | Re: You can use HTML/javascript/css for the client side but if you want to send emails you'll need to involve some server side code eventually. I'd recommend PHP if you just want to send emails. The code for that isn't complicated and you should pick it up pretty quick and there … |
Re: The DBNull is a special case and you'll need to do a check for it with: `If Not IsDBNull(dr(0))` and contine from there. | |
Re: In other words you have had an idea but don't know how to implement it? You say you have a problem with the logic but you don't even tell us what that is. How are we to help you wth that? | |
Re: That code works as is for me. I added a console.writeLine into your inner foreach and all of the values got output. What is happening when you run it? | |
Re: Welcome Maikel, You'll find there is a good range of skilled programmers on here, Python isn't my thing (beyond the basics) so you might not hear from me too often. But, regardless, welcome. It's good to have you. | |
Re: You've given us nothing to go on really but is the message too long for the area provided for it? It's possible that it is being stretched due to the overlong content and other elements need to move around it. | |
Re: The wordpress docs for get_the_category says: "Note: This function only returns results from the default “category” taxonomy. For custom taxonomies use get_the_terms()." So you might want to try that as an alternative. Otherwise, after the call to get_the_category, add: `var_dump($subaut); die();` This will kill the page generation (die) but dump … | |
Re: To 'refresh' a page is to reload it, generally in a browser window. It sounds like you want to call a page to make some code run. This means your code should be in a script technically, not part of a webpage but you can still achieve what you need. … | |
Re: Maybe some code to view? It's a bit tough to give advice otherwise. | |
Re: The usual response I give here (and hopefully most others do too) is to say that you need to show us your work. You say you have tried a few things so show us you best effort. We can hopefully guide from there. | |
Re: How much do you know about facial recognition software and algorithms needed to accurately detect parts of the face? To be honest this isn't an easy project and without skills in the correct, and reasonably advanced, fields you're going to struggle. | |
Re: I'd say your problem is here: int randomInteger = random.nextInt(); randomInteger [i] = MaxInteger; You declare randomInteger as an int then in the line treat it as an array. In anwser to your max and min question, once you have your random numbers, loop through them and compare them to … | |
Re: Key is a reserved word in MySQL. You need to use back ticks to escape it rather than quotes. Backticks are the key to the left of the 1 on most keyboards, with the tilde character: ~ as the shift option. | |
Re: If the username is unique (which it should be) you can do a SELECT first with the username as the parameter. If the result contains a row the user already exists, if it's empty then the user is not already in the table. You could also execute the insert if … | |
Re: What do you mean by handle it manually? One of the benefits of an auto-incrementing ID column is that you don't have to look after it yourself, you can let it automatically adjust for new entries. But if you want to make that column not a primary key you can … | |
Re: It's skipping the last item because, for the last item in the list, top.next == null. Therefore the final print loop isn't actioned. You'll need another way of determining when you're at the end of the list, using an index or moving onto the next item and checking if it … | |
Re: Each of the updates is working correctly it's that the third one runs last and is therefore the one you see. You're problem is this: `echo $k = "UPDATE details SET password = '$random_string'";` This updates the password column in all records of the table as you're not targeting a … | |
Re: You need at least the standard edition to have integration services. It isn't included in the express version. | |
Re: I would guess that you want one loop to be inside the other: for(i=0; i<=5; i++) { System.out.println("factors of "+num[i]); System.out.println(""); for(n=1; n<=num[i]; n++) the problems is here also { if(num[i]%n == 0) { System.out.println(n); } } } Otherwise you're printing "factors of..." 5 times and then moving onto a … | |
Re: Why are you deleting and inserting just to do an update? Simply update, that's what it is there for. Without knowing your database schema I would think that by deleting the record you're breaking some relations. Are there other tables that refer to the E_ID or E_CODE? If that is … | |
Re: You can use something similar to this to determine when you're close to the bottom: if ( ($(document).height() - $(window).height()) - $(window).scrollTop() < 300 ){ //code } You can alter the 300 part to trigger the code at different places. From there you just need to add in the code … | |
Re: HttpServerUtility.MapPath will return a string which is the physical path to the application, which will be the actual location of your web app (e.g. C:\inetpub\www\website\ for example). You can append onto that to navigate into sub folders in your project. Is that what you mean? | |
Re: Huh, I'd completely forgotten about INSERT INTO ... SET :) The code segment you've shown us should work fine (I can't see any errors anyway) so if you mean that the first INSERTION is completely replaced by the second in the database there must be something else going on. In … | |
Re: Do you mean something like the Regex.Match() method? You intend to search a string for a pattern correct? | |
Re: I'm not an expert in the requirements of recording financial transactions but I wonder why two tables would be needed, they'd each mostly be a duplication of the other. One table listing buyer, seller, date, auction, sale amount and whatever other details are needed would seem adequate. | |
Re: Without giving away too much, you need the two loops, one for the rows and one for the columns. You need to figure out how to organise the loops so for each row you put in the correct number of columns. Try to think of it in terms of what … | |
Re: As with a lot of people that post on coding forums, you need to help us to help you. The statement "the checkboxes don't work" is hopelessly vague. You would be better off telling us exactly what the expected behavior should be and what you actually see. Then we have … | |
Re: I'm not an expert in Mongo at all but have you tried it with double quotes around the text string instead of singles? Single quotes can be an escape character in SQL and may be in mongo too, in which case the ) isn't being read as such. | |
Re: And what problem are you having? Is it the typo in 'select producs.' in your SQL statement? Or something else? Seeing as your only using a few of the selected columns you can change your query from selecting all to just the ones you need. ut that won't fix the … | |
Re: Could you use the response.redirect to open the page in the current tab and from there, using javascript window.open, make opening the new tab one of the first things your second page does. That's almost what you're doing now, just the flow is different. In your current example it looks … | |
Re: Your exploding the textarea variable but not using your array anyway for one thing. You'd want to get array after checking if the POST varibable exists and then, if each element is to be an insertion of it's own, do a foreach through the array, with your prepare and execute … ![]() | |
Re: You haven't mentioned what is happening or included your code class so we don't have much to go on. I would suggest adding code to output PHP errors on the page and see what errors/warnings you get. ![]() | |
Re: You haven't included the CSS style rules for the classes used or any media queries that you are set up. Without those we're flying blind. You do have media queries right? | |
Re: Have you confirmed that the dataTable actually has some rows in it? The usual steps for a problem like this are: catch any errors (which you'll doing), confirm your sql statement works directly against the database and returns results, check your result in your code holds some data, double-check your … |
The End.