472,146 Members | 1,469 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,146 software developers and data experts.

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 1127
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
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.