469,913 Members | 2,022 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,913 developers. It's quick & easy.

conversion from varchar to datatype money

hii all!!

i am getting the following error-

implict conversion from data type varchar to data type money....USE CONVERT function to run this query...

i want to insert a textbox value(textbox7) to database...

i m attaching the code also...

String rep = textBox6.Text.ToString().Trim();
OleDbConnection con = new OleDbConnection("provider=sqloledb;server=.;user id=sa;password=;database=Project;");
//OleDbDataReader dr;
OleDbCommand comm;

str = "insert into AllPrograms values('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + richTextBox1.Text + "','" + textBox5.Text + "','" + textBox6.Text + "','" + textBox7.Text + " ')";
comm = new OleDbCommand(str, con);

MessageBox.Show("Record inserted successfully", "Data Entry Information");
Jun 13 '07 #1
1 1081
1,806 1GB
This code looks to me a little like Java, but you mention D/bases.....
Could you please clarify to help us point you in the right direction.....
Jun 13 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by al | last post: by
1 post views Thread by Thomas Beyerlein | last post: by
4 posts views Thread by Lucky | last post: by
3 posts views Thread by Sam Malone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.