Click here to Skip to main content
15,885,182 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
string dbpath = @"D:\Demo.db";

    SQLiteConnection connection = new SQLiteConnection("Data Source =" + dbpath);
    connection.Open();
    String query = "Insert into Customer(Job No,Customer Name,Address,Mobile No 1,Mobile No 2,Mobile No 3,Email_ID) values (" +txtsr.Text+","+txtname.Text+","+txtadd.Text+","+txtmb1.Text+","+txtmb2.Text+","+txtmb3.Text+","+txtemail.Text+")";
    SQLiteCommand command = new SQLiteCommand(query,connection);
    command.ExecuteNonQuery();
    connection.Close();
Posted
Updated 17-Feb-14 18:57pm
v3
Comments
Sergey Alexandrovich Kryukov 18-Feb-14 0:56am    
Not a question.
—SA
Krunal Rohit 18-Feb-14 0:57am    
what error ?
-KR
Dave Kreskowiak 18-Feb-14 0:57am    
and the error would be ..... ???
astika 18-Feb-14 0:59am    
Give quote to string
Malvikadas92 18-Feb-14 1:53am    
is the error related to data to data table or the data not being entered in table?

1 solution

You have not given plenty of info.
I'm assuming that there might be an issue with the connection string, So I'd suggest you to take a look at some example of Sqlite connection string at here[^].

-KR
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900