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, 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 i try to insert more then two records it doesnot work and it generates an 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 inserting more than two enteries

  2. #2
    Join Date
    Dec 1969

    Default RE: Help Me with this database Problem

    what method are you using to insert two records? Access doesn&#039;t support multiple SQL statements in a single action, unlike SQL Server.<BR><BR>j

Posting Permissions

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