Results 1 to 6 of 6

Thread: Valuta [Resolved]

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2003
    Location
    a place called home
    Posts
    64

    Valuta [Resolved]

    I have this Access DB where I have one field wich is 'VALUTA'. In my program I have a field where you enter a value for this valuta field to create an insertquery. My question: How do you insert valuta values? With quotes, whitout quotes, with the valuta in the field (USD, EUR???).

    Any help is welcome.
    Last edited by lazy; Mar 1st, 2005 at 05:14 AM.
    A good programmer is a LAZY programmer!

  2. #2
    Addicted Member BestS's Avatar
    Join Date
    Mar 2005
    Posts
    222

    Re: Valuta

    INSERT INTO tblName (Valuta) Values " & MyValutaValue

    that will insert a row with only one field
    say some more so we can help more useful

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2003
    Location
    a place called home
    Posts
    64

    Re: Valuta

    This is my query at this moment like he is generated in my code. Looks good I think. 'eenheidsprijs' is the field that is a valuta. This is the way I insert it. I thought it was good, but when I execute my program and this query is running, it all goes wrong.

    INSERT INTO tblArtikel (artikelNr, levId, omschrijving, ecoGegId, percentageBtw, eenheidsprijs, prodTypeId, updateble) VALUES (artikelNr = '1234', levId = 5, omschrijving = 'test', ecoGegId = 13, percentageBtw = 21, eenheidsprijs = '20', prodTypeId = 6, updateble = False)

    I just don't see what's wrong about the query.
    A good programmer is a LAZY programmer!

  4. #4
    Addicted Member BestS's Avatar
    Join Date
    Mar 2005
    Posts
    222

    Re: Valuta

    How about this one
    INSERT INTO tblArtikel (artikelNr, levId, omschrijving, ecoGegId, percentageBtw, eenheidsprijs, prodTypeId, updateble) VALUES ('1234', 5, 'test', 13, 21, '20',6, False)
    You have already listed the names of the fields above all you need to do now is to list the Values just put them in the right order
    DON'T user levID='test'm just the value 'test'
    SQL Knows where to put it
    Good luck!

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Mar 2003
    Location
    a place called home
    Posts
    64

    Re: Valuta

    Hahaaa! Superb! Resolved my friend ... thank you very much!
    A good programmer is a LAZY programmer!

  6. #6
    Addicted Member BestS's Avatar
    Join Date
    Mar 2005
    Posts
    222

    Re: Valuta [Resolved]

    Anytime I am glad that I helped you!
    Cheers

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