Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Data Type Mismatch

Discussion in 'Information Technology' started by Dio, Jul 28, 2006.

  1. Dio

    Dio
    Expand Collapse
    Guest

    Hi, somebody please help me :(.........I am getting an error returned as
    "Data type mismatch" when I try to insert from an Sql server 2000 stored
    procedure to a .DBF file.....I try to insert for exemple:

    '01/01/2006' into dbf file...and he doesn't work
    '01-01-2006' into dbf file...and he doesn't work
    '01.01.2006' into dbf file...and he doesn't work

    how is the corect format....or what is the source from my problem?

    if I renounce to this......the insert is corect .....this variable is the
    only who is "datetime" format....the rest who is "varchar" or "numeric" works
    fine.....
     
  2. Loading...


  3. Louwsma

    Louwsma
    Expand Collapse
    Guest

    Dio,

    You could try placing # around the date. So then it would be
    #01-01-2006# instead of '01-01-2006'.

    E.

    Dio schreef:

    > Hi, somebody please help me :(.........I am getting an error returned as
    > "Data type mismatch" when I try to insert from an Sql server 2000 stored
    > procedure to a .DBF file.....I try to insert for exemple:
    >
    > '01/01/2006' into dbf file...and he doesn't work
    > '01-01-2006' into dbf file...and he doesn't work
    > '01.01.2006' into dbf file...and he doesn't work
    >
    > how is the corect format....or what is the source from my problem?
    >
    > if I renounce to this......the insert is corect .....this variable is the
    > only who is "datetime" format....the rest who is "varchar" or "numeric" works
    > fine.....
     
  4. Louwsma

    Louwsma
    Expand Collapse
    Guest

    Dio,

    You could try placing # around the date. So then it would be
    #01-01-2006# instead of '01-01-2006'.

    E.

    Dio schreef:

    > Hi, somebody please help me :(.........I am getting an error returned as
    > "Data type mismatch" when I try to insert from an Sql server 2000 stored
    > procedure to a .DBF file.....I try to insert for exemple:
    >
    > '01/01/2006' into dbf file...and he doesn't work
    > '01-01-2006' into dbf file...and he doesn't work
    > '01.01.2006' into dbf file...and he doesn't work
    >
    > how is the corect format....or what is the source from my problem?
    >
    > if I renounce to this......the insert is corect .....this variable is the
    > only who is "datetime" format....the rest who is "varchar" or "numeric" works
    > fine.....
     
  5. Dio

    Dio
    Expand Collapse
    Guest

    yes I try but he doesn't work :(

    "Louwsma" wrote:

    > Dio,
    >
    > You could try placing # around the date. So then it would be
    > #01-01-2006# instead of '01-01-2006'.
    >
    > E.
    >
    > Dio schreef:
    >
    > > Hi, somebody please help me :(.........I am getting an error returned as
    > > "Data type mismatch" when I try to insert from an Sql server 2000 stored
    > > procedure to a .DBF file.....I try to insert for exemple:
    > >
    > > '01/01/2006' into dbf file...and he doesn't work
    > > '01-01-2006' into dbf file...and he doesn't work
    > > '01.01.2006' into dbf file...and he doesn't work
    > >
    > > how is the corect format....or what is the source from my problem?
    > >
    > > if I renounce to this......the insert is corect .....this variable is the
    > > only who is "datetime" format....the rest who is "varchar" or "numeric" works
    > > fine.....

    >
    >
     
  6. Louwsma

    Louwsma
    Expand Collapse
    Guest

    Have you linked the .dbf file and the stored procedure in Access as a
    linked table? And are you inserting values via a query in Access or via
    SQL server?

    Dio schreef:

    > yes I try but he doesn't work :(
    >
    > "Louwsma" wrote:
    >
    > > Dio,
    > >
    > > You could try placing # around the date. So then it would be
    > > #01-01-2006# instead of '01-01-2006'.
    > >
    > > E.
    > >
    > > Dio schreef:
    > >
    > > > Hi, somebody please help me :(.........I am getting an error returned as
    > > > "Data type mismatch" when I try to insert from an Sql server 2000 stored
    > > > procedure to a .DBF file.....I try to insert for exemple:
    > > >
    > > > '01/01/2006' into dbf file...and he doesn't work
    > > > '01-01-2006' into dbf file...and he doesn't work
    > > > '01.01.2006' into dbf file...and he doesn't work
    > > >
    > > > how is the corect format....or what is the source from my problem?
    > > >
    > > > if I renounce to this......the insert is corect .....this variable is the
    > > > only who is "datetime" format....the rest who is "varchar" or "numeric" works
    > > > fine.....

    > >
    > >
     
  7. Dio

    Dio
    Expand Collapse
    Guest

    yes I linked the .dbf file in access to see the rows in the table....to check
    the rows.....to see if the insert is OK.....but I create an INSERT INTO with
    VB.NET from a stored procedures from SQL server 2000
    "Louwsma" wrote:

    > Have you linked the .dbf file and the stored procedure in Access as a
    > linked table? And are you inserting values via a query in Access or via
    > SQL server?
    >
    > Dio schreef:
    >
    > > yes I try but he doesn't work :(
    > >
    > > "Louwsma" wrote:
    > >
    > > > Dio,
    > > >
    > > > You could try placing # around the date. So then it would be
    > > > #01-01-2006# instead of '01-01-2006'.
    > > >
    > > > E.
    > > >
    > > > Dio schreef:
    > > >
    > > > > Hi, somebody please help me :(.........I am getting an error returned as
    > > > > "Data type mismatch" when I try to insert from an Sql server 2000 stored
    > > > > procedure to a .DBF file.....I try to insert for exemple:
    > > > >
    > > > > '01/01/2006' into dbf file...and he doesn't work
    > > > > '01-01-2006' into dbf file...and he doesn't work
    > > > > '01.01.2006' into dbf file...and he doesn't work
    > > > >
    > > > > how is the corect format....or what is the source from my problem?
    > > > >
    > > > > if I renounce to this......the insert is corect .....this variable is the
    > > > > only who is "datetime" format....the rest who is "varchar" or "numeric" works
    > > > > fine.....
    > > >
    > > >

    >
    >
     

Share This Page