473,396 Members | 1,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,396 software developers and data experts.

regarding updation

Hi,

I m having one table Leave_Mstr...Leave Mstr is having fields

Leave_Code Primary Key number
leave_Name text
Days number

I can insert data to the tbale successfully.But during the updation time...The follwing Error s coming:

Query:
Dim SelQueryText As String = String.Empty
SelQueryText = "update Holiday_Mstr set Holiday_Name='" + txtHolidyCrtnHolidyName.Text.Trim + "',Holiday_Date='" + txtHolidyCrtnNofDays.Text.Trim() + "' where Holiday_Code='" + TextBox1.Text + "'"
con = New OleDbConnection(constring)
cmd.Connection = con
cmd.CommandText = SelQueryText
con.Open()
cmd.ExecuteNonQuery() 'Here is the error showing
con.Close()

Error:
Data type mismatch in criteria expression
plz help me.....
Mar 6 '07 #1
2 1056
kenobewan
4,871 Expert 4TB
Have you tried writing the values used in update? If Holiday_Date is a date type there wil be a problem trying to update it with text. How many fields are in Holiday_Mstr?
Mar 6 '07 #2
Frinavale
9,735 Expert Mod 8TB
Hi,

I m having one table Leave_Mstr...Leave Mstr is having fields

Leave_Code Primary Key number
leave_Name text
Days number

I can insert data to the tbale successfully.But during the updation time...The follwing Error s coming:

Query:
Dim SelQueryText As String = String.Empty
SelQueryText = "update Holiday_Mstr set Holiday_Name='" + txtHolidyCrtnHolidyName.Text.Trim + "',Holiday_Date='" + txtHolidyCrtnNofDays.Text.Trim() + "' where Holiday_Code='" + TextBox1.Text + "'"
con = New OleDbConnection(constring)
cmd.Connection = con
cmd.CommandText = SelQueryText
con.Open()
cmd.ExecuteNonQuery() 'Here is the error showing
con.Close()

Error:
Data type mismatch in criteria expression
plz help me.....
What is the error message?
Mar 6 '07 #3

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

Similar topics

2
by: shadab | last post by:
I wants Open Source Code of a Web site made in PHP for Updation of my Website.
1
by: AA | last post by:
We want to edit, update data of DataGrid in Asp.Net with VB.Net.and are writing the following code for EditCommand and UpdateCommand Event is : DataGrid1_EditCommand
0
by: Lakshmi Narayanan.R | last post by:
Hi Experts I am new to .NET. I need great explanation for "the updation in the disconnected data". How it is handled. That is, if mutiple user is interacting with the data, one will delete another...
1
by: Babz | last post by:
Hi, How I can prevent concurrent updation of a records in .net. I am using Dataset which is disconnected from the data source. In this situation if two users opens the same record, modifies the...
16
by: Vibhu | last post by:
Hello All, I am trying to update a database using dataset but seems that I am missing out something. After going through a lot of posts and checking my code, I am still at my wits end to figure...
0
by: prashant | last post by:
Hi, I am trying to set up Transactional replication with immediate updation. The configuration is as follows: 1. Publisher is SQL server 2000 Enterprise Edition, and Distributor is on the...
0
by: sajithamol | last post by:
Can we update the cells of the table control(just like how we perform updation in a grid view). If so how?
1
by: roshan56us | last post by:
Hi, i have problem in updation of access database, which is in backend and Visual basic as front end. its using 800 records in MS-Access but,while updating the database, it doesn't update sometime...
1
by: siri11 | last post by:
Hi everyone!!!!!!!!! If i update a record in a table in sqlserver from front end (c#.net),using a stored procedure for updating then after updation if i open the table then it is showing the same...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.