473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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...
PLZ HELP!!!!

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 + " ')";
con.Open();
comm = new OleDbCommand(str, con);

comm.ExecuteNonQuery();
MessageBox.Show("Record inserted successfully", "Data Entry Information");
Jun 13 '07 #1
1 1172
DeMan
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

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

Similar topics

3
by: Alex Ayzin | last post by:
Hi, I have a column in my WinGrid, that's being populated with numeric data, but it's of String datatype(business rule requires to have these numbers as varchars in DB). On top of that, I need...
2
by: al | last post by:
Dim dbParam_amount As System.Data.IDataParameter = New System.Data.SqlClient.SqlParameter dbParam_amount.ParameterName = "@amount" dbParam_amount.Value = amount.text dbParam_amount.DbType =...
1
by: Thomas Beyerlein | last post by:
Hi, I need help with a Error message. It is do to a datatype conversion of a varchar to a float. If anyone has code to convert or an away around this problem that would be great. Thanks for all...
4
by: Lucky | last post by:
Hi Guys!!! i'm newbie to asp.net 2.0. i've got a problem. i've a textfield on my webpage and if i insert " can't " or " test - test " value into it and post it back the " ' " and " - " get...
3
by: Sam Malone | last post by:
I'm writing code (in VB.NET/2005) to create a SQL Server database from some "other" database (user selected). So I "connect" to it and then use the GetSchema method options to retrieve its...
0
Krishna Ladwa
by: Krishna Ladwa | last post by:
In Sql Server 2000 Version, I found that no Notification message box appears when converting text column to varchar but the data gets truncated to the given size for the varchar. Whereas it appears...
0
by: maheshmohta | last post by:
Background Often while remodeling legacy application, one of the important tasks for the architects is to have an optimum usage of storage capabilities of database. Most of the legacy applications...
9
by: gggram2000 | last post by:
I need some help, cant figure out the error. SqlConnection dbConnection = new SqlConnection(xmldb); dbConnection.Open(); string sql = "SELECT InvStatus FROM SaleReceipts Where AccNum = '" +...
1
by: pchaitanya | last post by:
I have a column named entrydate in my table as datatype varchar as following mm/dd/yyyy . How can I convert the column to datetime format.. I tried the following but i got an error ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.