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

character limitation on Insert statement for MS Access?

Hi,
(1) I have an access form that allows users to enter data, and when
they click a button, the OnClick code that I've written uses a SQL
INSERT statement to insert the data into the database. I come from a
web programming background, so please forgive me if there is some
better approach to use in Access to accomplish this. My problem is
that when users type in more than 512 characters (in a Memo field) and
click the button, only the first 512 chars actually make it into the
database, trailed by a couple odd characters like squares and other
funky symbols. I'm trying to find the root of this limitation so that
I can correct it. Is it a limitation of the Insert statement? Is it a
limitation of the variable size that I'm using to store the data? Is
it somewhere else? I'll post code below -

(2) As another question:
I'm also trying to find a way to programmatically do what the built in
Access Edit forms do when you move to the next record (save all fields
and move to the next record). I basically want to create a button on
the form and have the OnClick code behind it that will accomplish the
same thing. Any ideas of where I might be able to find a description
of what takes place behind the scenes when a user clicks the > to go to
the next record on the built in edit forms in Access?

Here's a portion of the code referenced in (1):

Dim Feedback ' Product_Feedback corresponds to a Memo field in the DB
Set Feedback = db1.Form_AddDissemination.AddDissemProdFeedbackTex t 'The
textbox used to collect the data

DoCmd.RunSQL ("INSERT INTO [Disseminations] ([Product_Feedback]) VALUES
([AddDissemProdFeedbackText]);")
Feedback.Value = Null

Thanks in advance!

Nov 13 '05 #1
2 3140
On 18 Jan 2005 08:28:19 -0800, te********@hotmail.com wrote:
Hi,
(1) I have an access form that allows users to enter data, and when
they click a button, the OnClick code that I've written uses a SQL
INSERT statement to insert the data into the database. I come from a
web programming background, so please forgive me if there is some
better approach to use in Access to accomplish this. My problem is
that when users type in more than 512 characters (in a Memo field) and
click the button, only the first 512 chars actually make it into the
database, trailed by a couple odd characters like squares and other
funky symbols. I'm trying to find the root of this limitation so that
I can correct it. Is it a limitation of the Insert statement? Is it a
limitation of the variable size that I'm using to store the data? Is
it somewhere else? I'll post code below -


When you need to insert Memo data into a field, the easiest way is to use a
recodset. Otherwise, you have to use the Chunk procedures which are a royal
pain in the arse.

Nov 13 '05 #2
Thanks! I just tried something else that solved my problem to part 1 -
I declared my var Feedback as a String, then used that variable in the
Insert statement. I guess whatever variable was being used when I
didn't specify the var type had some sort of limit on it.
Any ideas on part (2)?

Nov 13 '05 #3

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

Similar topics

2
by: Bilal | last post by:
Hi, Does anyone know the escape character for & and # like in : Update GDO_INFO_ER set V_COMMENTAIRE='B&A' where V_USERMODIFICATION='bilal123' or Update GDO_INFO_ER set V_COMMENTAIRE='B#A' where...
6
by: Karen Middleton | last post by:
In MS Access I can do in one SQL statement a update if exists else a insert. Assuming my source staging table is called - SOURCE and my target table is called - DEST and both of them have the...
16
by: robert | last post by:
been ruminating on the question (mostly in a 390/v7 context) of whether, and if so when, a row update becomes an insert/delete. i assume that there is a threshold on the number of columns of the...
1
by: 2BaCook | last post by:
Hi, I have an Access database that I am creating a java front end to. I am trying to insert a record into a table and get a problem whenever I try to insert into my "Number" column. Here is my...
7
by: kosta | last post by:
hello! one of my forms communicates with a database, and is supposed to add a row to a table using an Insert statement... however, I get a 'oledb - syntax error' exception... I have double...
7
by: Cindy H | last post by:
Hi I'm having a problem getting the insert statement correct for an Access table I'm using. The Access table uses an autonumber for the primary key. I have tried this: INSERT INTO Tournaments...
0
by: Grip | last post by:
Hi, I have gone throught the group and Microsoft's online help and have seen many suggestions but I am still seeking clarity: 1. I have an excel spreadsheet. Column A contains text that may...
6
by: rn5a | last post by:
During registration, users are supposed to enter the following details: First Name, Last Name, EMail, UserName, Password, Confirm Password, Address, City, State, Country, Zip & Phone Number. I am...
2
by: CJVBAAccess | last post by:
I have a Query that I need to insert 58 columns of data. I built the query in VBA, but it will not work. Says it is missing a comma (,) so when i display what the Final Query looks like it is missing...
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
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
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
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...
0
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...

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.