msaccess error

Author Message
meyya1180

  • Total Posts : 2
  • Scores: 0
  • Reward points : 0
  • Joined: 11/13/2008
  • Status: offline
msaccess error Monday, December 08, 2008 8:58 PM (permalink)
0
this is the piece of code i am using to insert values in to my msacces database.i get the error "No value given for one or more required parameters".
can anyone help me .
the database contains 1 table namely "table1 " and table contains 2 fields id and name.
dbpath="D:\MR20594\databases\db2.mdb"
Set conn = CreateObject("ADODB.Connection")
conn.provider="Microsoft.Jet.OLEDB.4.0"
conn.open dbpath
sqlquery = "Insert INTO table1 Values(3,Jack)"
Set rs = CreateObject("ADODB.Recordset")
rs.open sqlquery,conn
 
 
#1
    ebgreen

    • Total Posts : 8227
    • Scores: 98
    • Reward points : 0
    • Joined: 7/12/2005
    • Status: offline
    RE: msaccess error Tuesday, December 09, 2008 3:12 AM (permalink)
    0
    I think this:

    sqlquery = "Insert INTO table1 Values(3,Jack)"

    may need to be this:

    sqlquery = "Insert INTO table1 Values(3,'Jack')"
    "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
    Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
    http://www.visualbasicscript.com/m_47117/tm.htm
     
    #2
      meyya1180

      • Total Posts : 2
      • Scores: 0
      • Reward points : 0
      • Joined: 11/13/2008
      • Status: offline
      RE: msaccess error Wednesday, December 10, 2008 10:45 PM (permalink)
      0
      ebgreen ,thanks for the assistance .i'll try it out .
       
      #3

        Online Bookmarks Sharing: Share/Bookmark

        Jump to:

        Current active users

        There are 0 members and 1 guests.

        Icon Legend and Permission

        • New Messages
        • No New Messages
        • Hot Topic w/ New Messages
        • Hot Topic w/o New Messages
        • Locked w/ New Messages
        • Locked w/o New Messages
        • Read Message
        • Post New Thread
        • Reply to message
        • Post New Poll
        • Submit Vote
        • Post reward post
        • Delete my own posts
        • Delete my own threads
        • Rate post

        2000-2012 ASPPlayground.NET Forum Version 3.9