473,406 Members | 2,620 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.

Expected end /msaccess/ insert into

i'm trying to insert data using INSERT INTO
ERROR: Expected end of statement

sSQL = "INSERT INTO AssesseeProfile1 ( NameoftheAssessee ,&_ PINCODE5, TELEPHONE5, STD5, FAX5, E - MAILID5, PAN, " ) VALUES "& _
"(' " & STD5 & " ', ' " & FAX5 & "', '" & EMAILID5 & "', '" & PAN & "')" 'Set our SQL query
conConnector.Execute (sSQL) 'Execute this SQL query
conConnector.Close
Set conConnector = Nothing
plz give me solution as early as possible
Nov 28 '06 #1
1 1337
nico5038
3,080 Expert 2GB
Hmm, your stringing fails on multiple points, try:

sSQL = "INSERT INTO AssesseeProfile1 (STD5, FAX5, [E - MAILID5], PAN ) VALUES "& _
"('" & STD5 & "', '" & FAX5 & "', '" & EMAILID5 & "', '" & PAN & "')" 'Set our SQL query

The fields "NameoftheAssessee ,&_ PINCODE5, TELEPHONE5, " aren't part of the VALUES clause so I've removed them and also the "after the PAN of the fieldlist as that's no fieldname...
When a fieldname has spaces you need to use brackets like: [E - MAILID5]
Better however not to use spaces nor minus signs in fieldnames.

Nic;o)
Nov 28 '06 #2

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

Similar topics

3
by: Matt | last post by:
When the ASP statement end with a _ character, then the next line cannot have comment ' character. Is that correct? Since I encountered the following error: Microsoft VBScript compilation...
2
by: Michel R. | last post by:
What`s wrong with this ??? The insert does not add into the database. Using a Winform and Database is sc.mdb Filename is supplier Fields SuppNbr Int64 SuppName String SuppPhone Int64...
0
by: Randy | last post by:
I want to get the data from msaccess to my visual c++ window,this is how I've send the data from my visual c++ window to msaccess Does someone know how I can put the data from access into my...
1
by: Ezhil | last post by:
Hi- I am trying to create MS access file (.mdb) from the data set with the following code. Every thing is working fine. But I found the MSACCESS.EXE is still running in the Task Manager. When...
4
by: rudy | last post by:
I'm trying to insert text values into a table in a MSAccess DB the values are stored in string variables Imports System.Data.OleDb .... Dim name As String Dim position As String Dim site As...
2
by: PraveenKadkol | last post by:
I have 25000 Rows, that needs to be inserted into Oralce table from MsAccess When i run below code, i am not getting any error message, Still records are not inserting into destination table. ...
6
by: odbcmsaccess | last post by:
hi i 'm writng a code using msaccess with odbc. my dsn name is htgry i want to insert data eneterd in text fields to a table named qwer on clicking a command button. code as follows ...
2
by: tmarunkumarit | last post by:
I want to insert datetime values into msaccess using asp.net by vb.. Am getting error that Syntax Error in INSERT INTO statement... My query is strSQL="insert into group0...
1
by: vikramrawal | last post by:
hi, I am using C# with MSAccess XP. I need to insert bulk of records around 10000 in MSAccess. So obviously if I inserts each record individually then it will take lot of time. By using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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.