我的那个值老是传不过来?、帮忙啊
'===================================================='获取购买货物的总数,单类商品编号、数量
OsumM=0
uid=GetCustomerID()
sqlcar="select* from t_shopcar ts inner join t_goods tg on ts.p_code=tg.goods_id where c_code="& uid
Set rscar =datasource.GetRecordSet(sqlcar)
' pcode=rscar("goods_code")
'pcount=rscar("p_count")
rscar.MoveFirst
While not rscar.Eof
OsumM=OsumM+(rscar("promote_price")* rscar("p_count"))
rscar.MoveNext
wend
'==========================================
'添加购物单
sql1="INSERT INTO t_order([order_code] ,[customer] ,[order_time] ,[total_money] ,[r_name],[r_addr] ,[r_postcode] ,[r_tel] ,[r_eml],[m_ocomment]) VALUES('"& orderCode &"','"& uname &"',now,'"& OsumM &"','"& oname &"','"& oaddr &"','"& opcode &"','"& oTel &"','"& oemail &"','"& ocoment &"')"
datasource.ExecuteCommand(sql1)
'=============================================
'添加订单详情
' pcode=rscar("goods_code")
' pcount=rscar("p_count")
rscar.MoveFirst
while not rscar.Eof
pcode=rscar("goods_code")
pcount=rscar("p_count")
sql="INSERT INTO[t_order_list]([order_code],[goods_code],[goods_number],[time])VALUES('"& orderCode &"','"& pcode &"','"&pcount &"',now)"
datasource.ExecuteCommand(sql)
'更改仓库货物数量
sql2="update t_goods set goods_number=goods_number-'"&pcount &"' where goods_id ='"& pcode &"'"
datasource.ExecuteCommand(sql2)
rscar.MoveNext
wend
那个红色区的值pcount=rscar("p_count")从绿色那块提出来后传到下面带下划线的地方就不对了:不是类型不匹配,就是找不到值,我试了好多遍了,不知道蓝色那块怎么写。请各位哥哥帮帮忙啊??很急的啊、