Hi Guys, just trying to save some information to excel, have set up the excel worksheet and Im trying to write to it using:
However I getCode:Dim conn1 As New System.Data.OleDb.OleDbConnection(m_sConn1) conn1.Open() Dim cmd As New System.Data.OleDb.OleDbCommand() cmd.Connection = conn1 cmd.CommandText = "INSERT INTO [Failed$] (OrderTime, Phone, MessageDetails) values ('" & Order_date & "','" & incomingtextno & "','" & textmsg & "')" cmd.ExecuteNonQuery() conn1.Close()
Syntax error (missing operator) in query expression ''Hi Guys ')'.
Where Hi Guys is the contents of textmsg.
I think i understand the problem is because it thinks that the bracket is part of the expression or something? what have i done wrong in the syntax?
thanks




Reply With Quote