Quantcast
Channel: Oracle, MySQL, Sybase, Informix and other databases
Viewing all articles
Browse latest Browse all 1350

Inserting of bit data type values

$
0
0

Hi 

I have a MySQL statement which is supposed to insert 2 bits data type value into 2 columns in MySQL database

IsCurrent and IsArchived are the bits(1) data type

mySQL = "CREATE TEMPORARY TABLE IF NOT EXISTS outputtbPollID (PollID char(38));INSERT INTO outputtbPollID(PollID) VALUES(?PollID); INSERT INTO Poll (PollID, AddedDate, AddedBy, QuestionText, IsCurrent,IsArchived)  VALUES(?PollID, '" + DateTime.Now.ToString("dd-MM-yyyy HH:mm:ss") + "', '" + Session["UserID"] + "' , ?Question, b'1',b'0'); SELECT PollID FROM outputtbPollID;";

I have an error when this sql statement is executed..

It works fine in a query in MySQL workbench but not as i run it on my asp web application

Error: 

Specified cast is not valid.



Viewing all articles
Browse latest Browse all 1350

Latest Images

Trending Articles



Latest Images

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