Results 1 to 3 of 3

Thread: [2008] Insert mysql

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2006
    Posts
    274

    [2008] Insert mysql

    whats wrong with this insert function

    Code:
    m_con = New SQLiteConnection(ConfigurationManager.ConnectionStrings("constr").ToString)
                m_con.Open()
                m_sqlstate = "" : m_sqlstate = "INSERT INTO support_action (case_id,product_id,member_id,support_id,action_datetime,action_text)" & _
                                           "VALUES ()"
                m_da = New SQLiteDataAdapter(m_sqlstate, m_con)
    Last edited by mendhak; May 16th, 2008 at 02:50 PM.

  2. #2
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724

    Re: [2008] Insert mysql

    No values specified, and the use of a data adapter over a command to execute a non-query statement. Also, initialising the m_sqlstate string twice

    Parameterized commands: http://www.vb-helper.com/howto_net_d...zed_query.html

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2008] Insert mysql

    Quote Originally Posted by wence
    whats wrong with this insert function

    Code:
    m_con = New SQLiteConnection(ConfigurationManager.ConnectionStrings("constr").ToString)
                m_con.Open()
                m_sqlstate = "" : m_sqlstate = "INSERT INTO support_action (case_id,product_id,member_id,support_id,action_datetime,action_text)" & _
                                           "VALUES ()"
                m_da = New SQLiteDataAdapter(m_sqlstate, m_con)
    If you get any exceptions or error messages, always mention them. It doesn't matter if the answer is obvious.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width