日期:2014-05-18  浏览次数:20511 次

求救SQL语句,谢谢了!高分求救!
我想实现三条记录:
GHS-鹏发83294989华             5817
GHS-雄新82812643洲2A056模块     5817
GHS-雄新82812643洲2A04444模块       5817

语句是这样的吗?
sql= "insert   into   Trader2(Trader,namet)   VALUES( "&trades& ", ' "&request.form( "GroupID ")& " ') "  

代码如下:
<%

if   request( "acction ")= "addgr "   then
          dim   trades
 
 

for   each   trade   in   request( "cvalue ")  
            trades=trades& " ' "&trade& " ', "  
   
  next
 
            trades=left(trades,len(trades)-1)

                            sql= "insert   into   Trader2(Trader,namet)   VALUES( "&trades& ", ' "&request.form( "GroupID ")& " ') "  

                            conn.execute(sql)
                 


              end   if


%>

我   得到的结果只有一条记录,我想得到三条记录!谢谢了大家!

------解决方案--------------------
<%

if request( "acction ")= "addgr " then
dim trades,namet
namet=request.form( "GroupID ")

for each trade in request( "cvalue ")

sql= "insert into Trader2(Trader,namet) VALUES( ' "&trade& " ', "&namet& ") "
conn.execute(sql)
next

end if


%>