473,406 Members | 2,281 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,406 software developers and data experts.

please solve my problem .i got syntex erro4sert4date statement in c# with database

please solve my problem .i got syntex erro4sert4date statement in c# with database

my coding is

OleDbCommand cmd=new OleDbCommand ();
cmd.CommandType =CommandType.Text ;
cmd.CommandText ="insert into kount(Id,Name of supervisor,Name of counting asst,Name of micro observer) values('"+txtid .Text +"','"+txtsupervisor.Text +"','"+txtasst.Text+"','"+txtobserver.Text +"')";
cmd.Connection =con;
con.Open ();
cmd.ExecuteNonQuery ();
con.Close ();
Jan 31 '12 #1
1 1254
Rabbit
12,516 Expert Mod 8TB
If you have spaces in a field name, you must demarcate it as a field. Different DBMS have different methods of demarcation so you will have to look it up in the documentation for whichever DBMS you're using.
Jan 31 '12 #2

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

Similar topics

0
by: Xerxes | last post by:
I am having a problem with accessing MySQL database from my PHP code. I tested accessing MySQL db locally and once things worked I created the same DB on my web hosting's server. No problem...
6
by: Manuel Canas | last post by:
Hello there, This is my SQL Insert Statement to insert a single into a table on a database; INSERT tb_test VALUES(' & _ txtTest1.Text & "' " & _ txtTest2.Text & "' " & _ txtPrice.Text & "')"
2
by: alexmaster_2004 | last post by:
hi i have made an application using C# that access sql2000. this application is just used to insert data to the database. i use something like this in my code: // string colmnA = TextBox1.Text;...
1
by: pkirk25 | last post by:
I have a program written in C++ with STL that does work. If I double click on the executable, it examines a data source and write a report to a file and writes useful messages to cout. I want...
14
by: bbawa1 | last post by:
It says invalid expression term && protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if...
5
by: saddist | last post by:
Hello, I have a problem with update statement CurrentDb.Execute ("UPDATE PRACOWNICY " & _ "SET ='" & Me!txtNazwiskoNew & "' And " & _ "='" &...
4
by: linendra | last post by:
Hi i am using oracle 8i. when i execute the join statement i got the error message. at the same time when i execute the same code to sql server and ms access the code execute successfully. i...
2
by: gsreenathreddy | last post by:
Hi! Please solve this query in employee table in scott user i would like view the details of all the employees (empno, ename )who are working under which manager(mgr) .with his manager name...
0
by: rosiemac | last post by:
Please delete - problem fixed
1
by: Jas Singh | last post by:
Hello, I am a beginner to SQL. I am working on a work related request and receiving the following syntex error: Msg 156, Level 15, State 1, Line 58 Incorrect syntax near the keyword 'AS'. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.