Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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.....
    > > >
    > > >

    >
    >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page