473,388 Members | 1,499 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,388 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 3139
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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...

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.