最近在用VB2008,每次运行之后都会提示System.Data.SqlClient.SqlException‘=’附近有语法错误,求教啊

我想删除生产调度(毕设)里的一些信息,先附上EditData.vb类内容:ImportsSystem.Data.SqlClientPublicClassEditDataS... 我想删除 生产调度(毕设)里的一些信息,先附上EditData.vb类内容:
Imports System.Data.SqlClient
Public Class EditData
Shared Function Insert(ByVal ConnStr As String, ByVal strSQL As String) As Integer
Dim conn As SqlConnection = New SqlConnection(ConnStr)
Dim myCommand As SqlCommand = New SqlCommand(strSQL, conn)
Dim count As Integer = 0
Try
conn.Open()
count = myCommand.ExecuteNonQuery()
Catch ex As Exception
MsgBox(ex.ToString())
Finally
conn.Close()
End Try
Return count
End Function

Shared Function Delete(ByVal ConnStr As String, ByVal table As String, ByVal row As String, ByVal value As String) As Integer
Dim conn As SqlConnection = New SqlConnection(ConnStr)
Dim strSQL As String = "DELETE FROM" + table + "WHERE" + row + "=" + "" + value + ""
Dim myCommand As SqlCommand = New SqlCommand(strSQL, conn)
Dim count As Integer = 0
Try
conn.Open()
count = myCommand.ExecuteNonQuery()
Catch ex As SqlException
MsgBox(ex.ToString())
Finally
conn.Close()
End Try
Return count
End Function
Shared Function Update(ByVal ConnStr As String, ByVal table As String, ByVal strContent As String, ByVal row As String, ByVal value As String) As Integer
Dim conn As SqlConnection = New SqlConnection(ConnStr)
Dim strSQL As String = "UPDATE" + table + "SET" + strContent + "WHERE" + row + "=" + "" + value + ""
Dim myCommand As SqlCommand = New SqlCommand(strSQL, conn)
Dim count As Integer = 0
Try
conn.Open()
count = myCommand.ExecuteNonQuery()
Catch ex As SqlException

MsgBox(ex.ToString())
Finally
conn.Close()
End Try
Return count
End Function
Shared Function Search(ByVal ConnStr As String, ByVal strSQL As String) As DataTable

'创建SqlConnection实例
Dim conn As SqlConnection = New SqlConnection(ConnStr)

'创建SQL命令
Dim myCommand As SqlCommand = New SqlCommand(strSQL, conn)

'打开数据库连接
conn.Open()

'设置适配器
Dim adapter As New SqlDataAdapter
adapter.TableMappings.Add("Table", "TEMP")
adapter.SelectCommand = myCommand

'填充数据集
Dim ObjectdsDataSet As New DataSet()
adapter.Fill(ObjectdsDataSet)

'关闭数据库连接
conn.Close()

'返回查询的表
Return ObjectdsDataSet.Tables("TEMP")

End Function

求教啊,但为修改这个错误就忙了一个星期了,请高手帮忙啊
展开
 我来答
leiyangbdwk
2012-05-09 · TA获得超过3295个赞
知道大有可为答主
回答量:4975
采纳率:12%
帮助的人:4389万
展开全部
是我了
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式