User Profile

Collapse

Profile Sidebar

Collapse
cptcanada
cptcanada
Last Activity: Jun 6 '08, 03:46 PM
Joined: May 28 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • cptcanada
    started a topic DateDiff function in SQl written in VB

    DateDiff function in SQl written in VB

    Hi All,

    I am getting an error saying that now() is not a reconized function in my datediff function would any one know why it is not being reconized?

    Thanks for the help
    -------------------------------------------------------------------------------------------------------------
    USE Master

    EXEC xp_startmail 'outlook', 'drive8'

    Use inv_tracking

    Declare @MyRecipients...
    See more | Go to post

  • cptcanada
    replied to VB syntax error
    I am uisng SQL server 2005, and for some reason it donts like any date format i am trying to use i get an error saying that the current_date is incorrect syntax
    See more | Go to post

    Leave a comment:


  • cptcanada
    replied to VB syntax error
    i am using the current_date
    See more | Go to post

    Leave a comment:


  • cptcanada
    replied to VB syntax error
    and now when i use
    mStringSQL1 = "DELETE * FROM Driver_daily_lo gs WHERE CURRENT_TIMESTA MP > date_destroyed"

    it is giving me an erro on the * saying that it is incorrect syntax near '*'
    See more | Go to post

    Leave a comment:


  • cptcanada
    replied to VB syntax error
    sorry the date is in dd/mm/yyyy
    See more | Go to post

    Leave a comment:


  • cptcanada
    replied to VB syntax error
    ya date_destroyed is in that format
    See more | Go to post

    Leave a comment:


  • cptcanada
    replied to VB syntax error
    Now even with adding in the comma that was missing I am still getiign an erro message saying incorrect syntax near ' , '


    mStringSQL = "DELETE Driver_daily_lo gs.emp_id, Driver_daily_lo gs.date_recieve d, " _
    & "Driver_daily_l ogs.violation, Driver_daily_lo gs.form_manner, Driver_daily_lo gs.log_status, " _
    & "Driver_daily_l ogs.status_date , Driver_daily_lo gs.date_destroy ed, "...
    See more | Go to post

    Leave a comment:


  • cptcanada
    replied to VB syntax error
    Thanks for the help, I am just getting used to doing SQL in VB
    See more | Go to post

    Leave a comment:


  • cptcanada
    started a topic VB syntax error

    VB syntax error

    HI, I am getting a sytax error saying that I have a comma that is not in a correct place. I have re-written this code many times over in idfferent forms and I am still getting the runtime syntax error,

    Thanks for the help

    mStringSQL = "DELETE Driver_daily_lo gs.emp_id, Driver_daily_lo gs.date_recieve d, " _
    & "Driver_daily_l ogs.violation, Driver_daily_lo gs.form_manner, Driver_daily_lo gs.log_status,...
    See more | Go to post

  • cptcanada
    replied to Help with VB + SQL code
    Thanks that helped out alot
    See more | Go to post

    Leave a comment:


  • cptcanada
    started a topic Where clause + VB

    Where clause + VB

    Why does it say WHERE DATE()>date_des troyed is not a roconized function in VB?

    Thanks for the help
    See more | Go to post

  • cptcanada
    replied to Help with VB + SQL code
    unterminated string error in Vb and SQL

    here is the VB code, and i am using the &_ to connect all my lines into one sting, why am i still getting the error?

    Thanks for the help

    So this is my code now and I am still getting the unterminated error

    ConnectionStrin g = "Provider=SQLOL EDB.1;server=ws us;Integrated Security=SSPI;P ersist Security Info=False;Init ial Catalog=inv_tra cking"...
    See more | Go to post
    Last edited by debasisdas; May 29 '08, 06:25 AM. Reason: Both the threads are merged.

    Leave a comment:


  • cptcanada
    replied to Help with VB + SQL code
    So this is my code now and I am still getting the unterminated error

    ConnectionStrin g = "Provider=SQLOL EDB.1;server=ws us;Integrated Security=SSPI;P ersist Security Info=False;Init ial Catalog=inv_tra cking"
    set cn = CreateObject("A DODB.Connection ")
    cn.Open ConnectionStrin g

    mStringSQL ="INSERT INTO driver_destroye d_log ( emp_id, date_recieved, violation, form_manner, log_status, status_date,...
    See more | Go to post

    Leave a comment:


  • cptcanada
    replied to Help with VB + SQL code
    so right after the inerst statement line, select put an & in?
    See more | Go to post

    Leave a comment:


  • cptcanada
    replied to Help with VB + SQL code
    That is correct, but there is a ; ending the SQL statement
    See more | Go to post

    Leave a comment:


  • cptcanada
    replied to Help with VB + SQL code
    Ok so with the line of code I have I moved the quotations so that the where clause is appart of the sting, but when i did that it tells me the string is unterminated.
    See more | Go to post

    Leave a comment:


  • cptcanada
    replied to Help with VB + SQL code
    Since I am developing in InfoPath there is no error number that is displayed when I get the two errors
    See more | Go to post

    Leave a comment:


  • cptcanada
    replied to Help with VB + SQL code
    Well the first error I get is a case error on the select stements. Then when I put the select statement in brackets it gives me an Expected Statement error.
    See more | Go to post

    Leave a comment:


  • cptcanada
    started a topic Help with VB + SQL code

    Help with VB + SQL code

    I am trying to useSQL code inside VB code and I keep getting an Expected Case error on my first select statement, can any one help me with this??

    Thanks

    ConnectionStrin g = "Provider=SQLOL EDB.1;server=ws us;Integrated Security=SSPI;P ersist Security Info=False;Init ial Catalog=inv_tra cking"
    set cn = CreateObject("A DODB.Connection ")
    cn.Open ConnectionStrin g

    mStringSQL ="INSERT...
    See more | Go to post
No activity results to display
Show More
Working...