473,325 Members | 2,860 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,325 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 1171
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.