AddWithValue
Posted by: Lawrence Lomazov
Date: March 19, 2013 02:22PM

Hello, everybody.
I am trying to make this simple code to pass actual value to the command parameter. Instead, all I am getting in the table is Null.

CorpConn = New MySqlConnection(MySQLConnectStr)
SQL = "INSERT INTO Log_Staff_LoginTime" + _
" (CallName) VALUES(@CallName);"
WrkCmd = New MySqlCommand(SQL, CorpConn)
WrkCmd.Parameters.AddWithValue("@CallName", "John")
CorpConn.Open()
WrkCmd.ExecuteNonQuery()
CorpConn.Close()

Even if my life depended on it, I can't see what I am doing wrong here. Please help!!!
Larry

Options: ReplyQuote


Subject
Written By
Posted
AddWithValue
March 19, 2013 02:22PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.