vb6 addate with sql server 2005 smalldatetime and datetime

  • Dear all,

    i am new in this forum ,

    i have a problem regarding vb6 ado 2.8 passing datepicker date to the sql server strored procedure containing a variable decleration of smalldatetime.

    the stored procedure rises a error in vb6 (addbtimestamp-parametre datatype):

    -2147217900-[Microsoft][ODBC SQL Server Driver][SQL Server]Implicit conversion from data type datetime to int is not allowed. Use the CONVERT function to run this query.

    (as suggested by http://support.microsoft.com/kb/214459)

    the stored procedure rises a error in vb6 (addate-parametre datatype):

    -2147217887-[Microsoft][ODBC SQL Server Driver]Optional feature not implemented

    Please reply in this regard.

    (Thanks in advance)

  • Change the datatype as datetime instead of int and then check.

  • :-)Thanks for reply Mr SSC Rookie;

    After posting this topic i tried myself with more experiments on it.

    finally i got that the format of date is must be yyyy-mm-dd for insertion of data in Sql server 2005 sp thru vb6.

    Again thanks for your consideration.

    😀

  • COOL 🙂

    There are lot of date format in sql server. Use "CONVERT" function for neccssary data format.

    And also ref this URL:

    http://msdn.microsoft.com/en-us/library/ms187928.aspx

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply