Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
J

Johnkokk

@Johnkokk
About
Posts
34
Topics
12
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Factoring ???? [modified]
    J Johnkokk

    Thank you very much.That did it exactly.

    .NET (Core and Framework) tutorial question

  • Factoring ???? [modified]
    J Johnkokk

    Do you really think, that the problem is to multiply 2 numbers ? :-D I'll take it that i wasn't clear enough maybe. I give you a number A=160 Let's say that i also give you an array, with the following numbers [2,4,5,8,10,20,40] From the numbers in the array, i want to get number A, by multiplying whatever numbers needed. Each number in the array can be used only ONCE. The numbers in the array and also number A can be different each time.It's not always the same. So, for the specific numbers above and using only my mind, i see that 160 can be produced by 2x8x10 or 4x40 or 8x20. It cannot be produced obviously by 2x4x5x8, and so on. So, the problem is to find the algorithm, that can find at least one combination of numbers the can produce A. Sorry if I am not that clear. Thanks anyway.

    .NET (Core and Framework) tutorial question

  • Factoring ???? [modified]
    J Johnkokk

    Not homework.I am too old for that now :-D To make things simpler maybe, I've reached to a point that i have limited my list of numbers that can be multiplied betweend them, to numbers which actually have a pottential. So for 160, the program limited the choises to (2,4,5,8,10,20,40) You can see that if you multiply some of them you can come up with 160.For example 2x8x10 or 4x40, etc My programming question is some pointers on how to get this 2x8x10 ? It's probably easy but i am at a point that the mind is frozen :-D Thanks

    .NET (Core and Framework) tutorial question

  • Factoring ???? [modified]
    J Johnkokk

    Yeah sorry.I use VB .net and thought here would be a good place.If mods think they should move it to somewhere else, no problem

    .NET (Core and Framework) tutorial question

  • Factoring ???? [modified]
    J Johnkokk

    Ok, I am not sure that "factory" is the correct word but here it goes. Let's say that we have a number e.g. A=160. Also let's take for GRANTED that we have the following numbers Nx=(2,3,4,5,6,7,8,10,15,20,25,30,40,50,100,500) I want to find out what numbers from Nx do i have to MULTIPLY between them, in order to get number A ? So for example 160=4x40 or 160=2x4x20, etc. Does that make any sense ? Note : We have to use ONLY ONCE the numbers from Nx.So we cannot do for example 12=2*2*3 (we use 2 twice).We could only do 12=2x6, etc

    modified on Wednesday, March 9, 2011 4:32 AM

    .NET (Core and Framework) tutorial question

  • Convert mouse position to langtitude-longitude on a map
    J Johnkokk

    OK, let's say i have this map loaded on a form http://upload.wikimedia.org/wikipedia/commons/9/92/Satellite_image_of_Greece.jpg[^]. Is there a way to convert the mouse position on that map as i move, to latitude and longitude ? If no, how such a thing can be done ? Thanks.

    Visual Basic question

  • SQL query for date
    J Johnkokk

    Well using # worked, but actually it expects the date to be completely reversed. So if i use 'select * from journal1 where day>#15/03/2010#' it doesn't get any results, but if i use 'select * from journal1 where day>#2010/03/15#' it is working. Is it possible to change this ? Thanks.

    Database database help question

  • SQL query for date
    J Johnkokk

    I have a field in an access database called day and is declared as DATE/TIME I want to find through SQL all records with dates between 01/03/2010 and 15/03/2010 When i sent the sql command 'Select * from journal1 where day between 01/03/2010 and 15/03/2010' it does not work. Even if i try 'Select * from journal1 where date(day) between 01/03/2010 and 15/03/2010' it doesn't work. I am almost sure that the problem is because the day includes also a time portion in it, but if i put date(day) shouldn't this be working ? Thanks.

    Database database help question

  • Update a date/time field through VB. net
    J Johnkokk

    Never mind.I figured it out. I needed brackets for the time field. So it should be :

    UPDATE tablename SET [time]='12:34' where id=80

    Database database help question csharp announcement

  • Update a date/time field through VB. net
    J Johnkokk

    How do I update a date/time field in a Microsoft Access database using SQL ? I am using VB .net and up to now all my sql statements work fine. I have tried several variations of this statement but none work. They all give me a generic "Error in UPDATE statement" message.If i try any other column of my database, the UPDATE statement works fine.It only has a problem with the TIME field which is declared in the database as DATE/TIME. For instance the following will NOT work.

    UPDATE tablename SET timecolumn='12:34' where id=82

    Database database help question csharp announcement

  • Datagridview sorting and Database.
    J Johnkokk

    Anyone guys ? Any ideas ?

    .NET (Core and Framework) database algorithms question

  • Datagridview sorting and Database.
    J Johnkokk

    You need to either use a unique key to load the record into the new window, or sort your underlying dataset in the same way as the DGV when the column header is clicked. There is already an ID field which is unique. How do i sort the dataset ? That's the question in the first place. :)

    .NET (Core and Framework) database algorithms question

  • Datagridview sorting and Database.
    J Johnkokk

    I have a datagridview which is bound to a ms access database, through a dataset. The user can click one record on the DGV, and open another window with all the data of the record, so that he can edit them,etc. If he tries to sort the DGV by a column, let's say the date field and then tries to load a record the thing gets messed up. It seems that whilst the DGV is sorted, the dataset is not equally "sorted". That means that the user can try to load a specific record but instead he gets a completely different one. Is there a solution to that ?

    .NET (Core and Framework) database algorithms question

  • Date format in ACCESS database
    J Johnkokk

    <b>2. using the DataFormatString property of bound column in gridview. (examples: DataFormatString="{0:MM-dd-yyyy}", DataFormatString="{0:MMM dd, yyyy}", DataFormatString="{0:ddd MM, yyyy}", etc )</b> That worked, thanks

    Database database csharp css help question

  • Date format in ACCESS database
    J Johnkokk

    I've already tried setting the formating in the database field. It doesn't work

    Database database csharp css help question

  • Date format in ACCESS database
    J Johnkokk

    Ok, here is a silly one. I have a ms access database that i want to manipulate through a datagridview in my VB .net app. I have defined the appropriate field in the database as DATE/TIME, because i will make date filtering on the records through sql in my app. Now when i add any record through my app, i always get a date format like 17/2/2010 0:00:00 in the datagridview, obiously because this is the format of the access database which is databound to the grid. I DO NOT want the time part. Is this doable or i am stuck with it ? Thanks

    Database database csharp css help question

  • Date manipulation and SQL....
    J Johnkokk

    Thanks, that did it !!! I should know better about this SQL :)

    Visual Basic database help question tutorial

  • Date manipulation and SQL....
    J Johnkokk

    I've got an Access Database For whatever reason, there is a field in there for DATE that is declared as string. Also there are 3 other fields in there called FDAY,FMONTH,FYEAR that are declared as number and actually get the parsed values from the DATE field. So if the user enter for DATE 21/12/2009, the FDAY=21, FMONTH=12, FYEAR=2009 Now at some point, the user wants to get all the records from 20/6/2009 - 12/12/2009 Can someone help, on how we can make an SQL query to do that ? Whatever i have tried does not solve the problem. It is easy, as long you have the same month and year in the "FROM" and "TO", because you just check the FDAY variable to be within the limits. For example if we wanted from 5/10/2009 - 23/5/2009, the SQL would be "SELECT * FROM TABLE WHERE FDAY BETWEEN 5 AND 23" However the things get complicated when you have different month or year.For example if we want the records from 5/6/2009 to 23/11/2009. Now what ? Don't ask why the date field is declared as STRING and not DATE, in the first place. The question is, is it doable with what we have now ? Thanks.

    Visual Basic database help question tutorial

  • January minus 2 should be November......(a little math and some SQL)
    J Johnkokk

    Why will it break ? With the solution i currently have, if the user puts 11(November) and 2 for the span, i get the following numbers, after a little math : 9,10,11,12,1 Then i just make an SQL like "WHERE MONTH IN (9,10,11,12,1)" It actually works now.

    Visual Basic database help tutorial

  • January minus 2 should be November......(a little math and some SQL)
    J Johnkokk

    Yeah that gave my brain a start. Solved.Thanks

    Visual Basic database help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups