Reply to thread

<span style="font-size:11.0pt; line-height:115%; font-family:Calibri,sans-serif I create one tabel in SQLCE3.5 and and write following code:<br/>

using (conn)<br/>

{<br/>

conn.Open();<br/>

SqlCeCommand SqlInsert = conn.CreateCommand();<br/>

SqlInsert.CommandText = "INSERT INTO Database1.Tabel1 VALUES(@SerialNo,@name,@price) Values(" + textBox1.Text + ", " + "PLU" + ", " + 12345 + ")";<br/>

using (SqlInsert)<br/>

{<br/>

try<br/>

{<br/>

SqlInsert.ExecuteNonQuery();// This show error and not insert <br/>

data to tabel<br/>

}<br/>

catch<br/>

{<br/>

MessageBox.Show("Cannot insert Data");<br/>

}<br/>

Error: The table name is not valid. [ Token line number (if known) = 1,Token line offset (if known) = 23,Table name = Tabel1 ]<br/>

How can solve this problem?


View the full article


Back
Top