Results 1 to 13 of 13

Thread: [2005] query problem

Hybrid View

  1. #1
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: [2005] query problem

    Code:
    d1 = Format(d1,"dd/mm/yyyy")
    b = "SELECT STTM_CUSTOMER.CUSTOMER_NAME1, STTM_CUST_ACCOUNT.CUST_AC_NO, STTM_CUST_ACCOUNT.ADDRESS1, STTM_CUST_ACCOUNT.ADDRESS2, STTM_CUST_ACCOUNT.ADDRESS3, STTM_CUST_ACCOUNT.ADDRESS4, STTM_CUST_PERSONAL.TELEPHONE, STTM_CUST_PERSONAL.FAX, STTM_CUSTOMER.COUNTRY, STTM_CUST_PERSONAL.E_MAIL FROM STTM_CUST_ACCOUNT, STTM_CUSTOMER, STTM_CUST_PERSONAL WHERE STTM_CUST_ACCOUNT.CUST_NO = STTM_CUSTOMER.CUSTOMER_NO AND STTM_CUSTOMER.CUSTOMER_NO = STTM_CUST_PERSONAL.CUSTOMER_NO AND trunc(STTM_CUSTOMER.CHECKER_DT_STAMP) = '" & d1 & "'"
    Might work...

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  2. #2
    Hyperactive Member
    Join Date
    Jun 2006
    Posts
    396

    Re: [2005] query problem

    I think I spotted the problem and also discovered you are using VB.Net.

    d1 is dimensioned as System.DateTime and VB.Net doesn't like this statement.

    Code:
    d1 = Format(d1,"dd/mm/yyyy")
    Try this change

    Code:
    Dim d1 As System.DateTime = System.DateTime.Today
    Dim d2 As String
    d2 = Format(d1, "dd/MM/yyyy 12:00:00")
    
    b = "....... your SQL statement ... = '" & d2 & "'"
    Last edited by LinXG; Apr 13th, 2007 at 09:30 AM.

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