CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Threaded View

  1. #4
    Join Date
    Jul 2005
    Posts
    1,083

    Re: fill a database with numbers

    I never used Data Control but try next
    Code:
    For a = 1 to 97
      For b = a + 1 to 98
        For c = b + 1 to 99
          For d = c + 1 to 100
            numbs.recordset.addnew
            numbs.recordset!Num1 = a
            numbs.recordset!Num2 = b
            numbs.recordset!Num3 = c
            numbs.recordset!Num4 = d
            numbs.recordset.update
          Next d
        Next c
      Next b
    Next a
    Another is to display the numbers in 4 text boxes that are linked (bound controls) with the table fields (yes those fields that David say are evil and I agree)
    Last edited by jggtz; March 17th, 2013 at 09:53 PM. Reason: syntax
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured