Results 1 to 6 of 6
  1. #1

    Default vb 6 to database date from to from table how?


    guys unsaon man pag display sa date from database to VB like for example i want to input date from "may" to "june" daun if mag search ana na specific date then it will only diaplay from may to june how pls,,,,... help..

  2. #2

    Default Re: vb 6 to database date from to from table how?

    bro,

    unsa imong database?

    Things that you should do to retrieve the records that you want:

    1) You have to connect to the database
    2) You have to create a query and use the date as your qualifier in your query
    3) If you already retrieved the records, format the date using FORMAT function

  3. #3

    Default Re: vb 6 to database date from to from table how?

    * establish a connection to the database (if Oracle database use OO4O and use PL/SQL server side programming and if not Oracle use ADODC)
    * create a procedure that will be called to populate recs from database
    using your date range.

    have a nice day!

  4. #4

    Default Re: vb 6 to database date from to from table how?

    its all in the sql query string, you are retrieving from the database

  5. #5

    Default Re: vb 6 to database date from to from table how?

    if your using sqlserver as ur back end ur sql statement might look like this:
    Code:
     str1 = "Select ID,Entrynumber,Entrydate,Syscreator,Syscreated,Remarks,Status "
               str2 = "from vfimerchandiserhdr "
               str3 = "where Entrydate >= '" & DTP2.value & "' and Entrydate <= '" & Format(DTP3.value, "mm/dd/yyyy 23:59:00") & "' order by entrynumber"
    entrydate is my date field and DTP2, DTP3 is my datepicker

    if your using access as ur back end ur sql statement might look like this:
    Code:
        str1 = "select * from dataheader "
        str2 = "where status = false and TransactionDate >= #" & DTP2.Value & "# and TransactionDate <= #" & Format(DTP3.Value, "mm/dd/yyyy 23:59:00") & " #"
    this snippet comes from one of my vb6 customized program for a company......hope it is useful to you


  6. #6

    Default Re: vb 6 to database date from to from table how?

    select id_no, firstname, lastname, birth_date
    from emp
    where birth_date between to_date('varFrom','MM-DD-YYYY') and to_date('varTo','MM-DD-YYYY')
    /* your CreateDynaset method here */
    do
    /* populate grid here (assuming that your object is a grid)*/
    loop
    /* close dynaset here */

    as simple as that...

  7.    Advertisement

Similar Threads

 
  1. HOW TO ADD RECORD to database from ASP using jscript
    By hybrid_X in forum Programming
    Replies: 4
    Last Post: 05-22-2007, 04:56 PM
  2. How to connect a printer far from the computer?
    By carlo_ in forum Networking & Internet
    Replies: 12
    Last Post: 06-28-2006, 05:02 PM
  3. Replies: 0
    Last Post: 12-02-2005, 07:53 AM
  4. How to create a ISO file from a CD using Nero 6.6 version
    By Bashka in forum Software & Games (Old)
    Replies: 1
    Last Post: 11-14-2005, 10:08 AM
  5. globe: how to turn off horoscope feature from 2340
    By geff_chang in forum Gizmos & Gadgets (Old)
    Replies: 1
    Last Post: 11-02-2005, 08:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top