473,804 Members | 2,292 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 21218
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_*********@mo l.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_*********@mo l.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
12425
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 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.
2
1976
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 an unhandled exception in System.Windows.Forms.dll, to the effect that the string length must be less than 64. If I trim the string to 31 characters (62 bytes) everything's fine and the event goes as intended. But if the string length is 32 or...
8
1808
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
1307
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 some data that wasn't parsing right because it also contained tags that conflicted with the tags designating the data. To get around this the programmer of the COM object (not me) decided we could put string lengths in the tags, so if an element...
11
4156
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" fields. When "Contract1" cannot accept further input, the user continues on to "Contract2", ect. I don't want to use memo fields for obvious reasons. Does anyone have an event procedure and code, which could monitor
3
7421
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
59243
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 prefer to limit it in the control rather than validating afterward.
4
2962
by: Derty | last post by:
Any way to limit the length of databound text on a datalist itemtemplate?
5
3048
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
9591
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10343
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10331
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10087
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9166
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5667
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4306
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.