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

Is there limit to SQL string length

SJM
In some VBA code I am building an SQL string to append a new record to a
table. The string involves 40 fields. What I am finding is that it works
with 39 fields but when I add 40 it fails with the error 3134 (syntax
error). I am 99% sure there is no syntax error, rather I suspect that it
could be due to limit on string length or number of fields. I have not been
able to find anything that defines this though.
Nov 12 '05 #1
2 21190
Look up "specifications" in help:

Max size of SQL string: 64,000 characters (approx)

Max number of fields in a recordset: 255

--
Michael Hopwood (Phobos)
"SJM" <1_*********@mol.mn> wrote in message
news:46*****************@nnrp1.ozemail.com.au...
In some VBA code I am building an SQL string to append a new record to a
table. The string involves 40 fields. What I am finding is that it works
with 39 fields but when I add 40 it fails with the error 3134 (syntax
error). I am 99% sure there is no syntax error, rather I suspect that it
could be due to limit on string length or number of fields. I have not been able to find anything that defines this though.

Nov 12 '05 #2
DFS

"SJM" <1_*********@mol.mn> wrote in message
news:46*****************@nnrp1.ozemail.com.au...
In some VBA code I am building an SQL string to append a new record to a
table. The string involves 40 fields. What I am finding is that it works
with 39 fields but when I add 40 it fails with the error 3134 (syntax
error). I am 99% sure there is no syntax error, rather I suspect that it
could be due to limit on string length or number of fields. I have not been able to find anything that defines this though.


Can you post your SQL statement with and without the 40th field?

I have a feeling you have a trailing comma after the 40th field.

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: SJM | last post by:
In some VBA code I am building an SQL string to append a new record to a table. The string involves 40 fields. What I am finding is that it works with 39 fields but when I add 40 it fails with the...
2
by: Tom Dacon | last post by:
I'm raising an event in a component, using ISynchronizeInvoke.Invoke, and my event args object contains a string as one of its members. If the string is longer than 63 bytes, the Invoke call pulls...
8
by: Al Sav | last post by:
Hi, Which one of these below two is a better way to find out if the string is of zero length? string.Length == 0 or string.Length < 0 Alwin S.
1
by: MattB | last post by:
Hi. I've got a vb.net/asp.net application that passes strings back a forth between a c++ COM object. We use simple tagging to designate what's what, and it's worked pretty well until now. We had...
11
by: wolfesimon | last post by:
I have a form where the user copies a handwritten contract into a text field "Contract1". The contract usually exeeds 255 characters. Therefore I provided "Contract2", "Contract3", and "Contract4"...
3
by: ipellew | last post by:
Hi; Whats the maximum string length in Javascript. Is it the same across all the browsers? max_s_len = str.length // what the max number of chars we can have is str? Regards
27
by: Killer42 | last post by:
Hi all. Does a textbox on an Access form have an equivalent of the VB6 .MaxLength property? I need to limit the length of an input string. It's not bound to anything, just used in code, but I'd...
4
by: Derty | last post by:
Any way to limit the length of databound text on a datalist itemtemplate?
5
Inbaraj
by: Inbaraj | last post by:
Hi.. With the help of the Regular Expression can we Cut a string to certain length. if yes plz help me with sample codeing... with regards Inbaraj.D
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...
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
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
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,...
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.