Help Me with this database Problem

Results 1 to 2 of 2

Thread: Help Me with this database Problem

  1. #1
    Zeeshan hayat Guest

    Default Help Me with this database Problem

    dim objcommand, recordset<BR>set objcommand=server.CreateObject ("adodb.command")<BR>objcommand.ActiveConnectio n =strconnect<BR>objcommand.CommandText ="insert into tablename"&_ (firstname, secondname, <BR>email, country )"&_<BR>"values (&#039;value1&#039;, &#039;value2&#039;, &#039;value3&#039;, &#039;value4&#039;) "<BR> <BR>objcommand.CommandType =adCmdText <BR><BR>set recordset=objcommand.Execute <BR>set objcommand=nothing<BR>recordset.Close <BR>set recordset=nothing<BR><BR><BR>this piece of code works fine for entering two values in a table but when <BR>i try to insert more then two records it doesnot work and it generates an <BR>error. will any one help me with that <BR>i am using access database <BR><BR><BR>the error it gives is syntax error in INTO clause<BR><BR>I have checked the syntax again and again and it still doesn&#039;t work for <BR>inserting more than two enteries <BR>also all the fields in the database are valid enteries that is all are memo<BR>

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default always post the error message

    and not give us YOUR interpretation of the error<BR><BR>do you have a table called tableName or have you typed in this code. Post the REAL code.<BR><BR>"insert into tablename (firstname, secondname, <BR>email, country ) values (&#039;value1&#039;, &#039;value2&#039;, &#039;value3&#039;, &#039;value4&#039;) "<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts