none
c# sqlite RRS feed

  • Question

  • Hi all
    i am trying to use sqlite with c# but show SQL logic error near "INSTER": syntax error'
    I HOW TO MODIFY
    THANKS

    
    Sunday, March 15, 2020 2:31 PM

Answers

All replies

  • You are missing the T in insert e.g.

    INSERT INTO

    See https://www.w3schools.com/sql/sql_insert.asp

    See the following for SqlLite parameters

    https://www.sqlite.org/c3ref/bind_parameter_count.html


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange


    Sunday, March 15, 2020 4:10 PM
    Moderator
  • ‌Hi robotal Timberlake,

    The insert term is incorrect  please change this ( INSTER  ) to (INSERT

    string query = "INSERT INTO albums (title,artist) VALUES ('title','artist')";


    Please remember to mark the replies as answers if they helped you :) ~

    Sunday, March 15, 2020 6:40 PM
  • Hi,

    It seems that your problem has been solved. If so, please click "Mark as answer" to the appropriate answer, so that it will help other members to find the solution quickly if they face a similar issue.

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, March 20, 2020 9:48 AM