Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1451

AddWithValue (no replies)

$
0
0
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

Viewing all articles
Browse latest Browse all 1451

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>