i think you'd betton use the sp,that's simple.
the rest question:存在就修改,不存在就插入,
ref related help.

解决方案 »

  1.   

    这个最好在存储过程中做
    Declare @Count int
    Select @Count=Count(UserName) From UserInfoIF @Count=0
    BEGIN
    ...插入
    ENDIF @Count>0
    BEGIN
    ...更新END
      

  2.   

    vbscript ????????
    vbscript 不行的。
      

  3.   

    我还是不明白,.net用vb的语法
      

  4.   

    使用dataadapter
    dap.fill(dt)
    if dt.rows.count=0 then
      dim dr as new datarow
    dr=dt.newrow()
    dr.item(i)=数据
    dt.rows.add(dr)
    else
      //存在
    end if