Dim insstr As String = "insert into gp(xqgy,sl,yq) values('" & xqgy.Text & "','" & sl.Text & "','" & yq.Text & "')"
                Dim objcommand As New SqlCommand
                objconnection.Open()                objcommand = New SqlCommand(insstr, objconnection)
                objcommand.ExecuteNonQuery()
                objconnection.Close()

解决方案 »

  1.   

    直接在sql2000里运行sql语句就没有问题,用web页面提交就有问题。
      

  2.   

    insert into gp(xqgy,sl,yq) values('222','22','连接到: Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production With the Partitioning option JServer Release 9.2.0.5.0 - Production 已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集服务器使用 WE8ISO8859P1 字符集 (可能的字符集转换) 即将导出指定的用户... . 正在导出 pre-schema 过程对象和操作 . 正在导出用户 RMAN 的外部函数库名称 . 导出 PUBLIC 类型同义词 . 导出私有类型同义词 . 正在导出用户 RMAN 的对象类型定义即将导出 RMAN 的对象 ... . 正在导出数据库链接')这样的sql语句在text提交框里是有回车形式的,但提交后数据库里只保存“连接到: Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production”这一段即只保存第一段内容其它内容不保存,但上述语句直接到sql里运行确可以全部运行。
      

  3.   

    好了,我改了一下代码
      If objdataset.Tables("tmpdg").Rows.Count <= 0 Then
                    'Response.Write(insstr)
                    'Response.End()
                    Dim cont As String                Dim endcont As String                Dim i
                    For i = 1 To Len(yq.Value)
                        If Mid(yq.Value, i, 1) = Chr(13) Then
                            cont = Mid(yq.Value, i, 1) & "<br>"
                            endcont = endcont & cont
                        Else
                            endcont = endcont & Mid(yq.Value, i, 1)
                        End If
                    Next
                    'Response.Write(endcont)
                    'Response.End()
                    Dim insstr As String = "insert into gp(xqgy,sl,yq) values('" & xqgy.Text & "','" & sl.Text & "','" & endcont & "')"