473,695 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 programmaticall y 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_Feedbac k corresponds to a Memo field in the DB
Set Feedback = db1.Form_AddDis semination.AddD issemProdFeedba ckText 'The
textbox used to collect the data

DoCmd.RunSQL ("INSERT INTO [Disseminations] ([Product_Feedbac k]) VALUES
([AddDissemProdFe edbackText]);")
Feedback.Value = Null

Thanks in advance!

Nov 13 '05 #1
2 3157
On 18 Jan 2005 08:28:19 -0800, te********@hotm ail.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
2103
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 V_USERMODIFICATION='bilal123' I would like to insert & and # literally in the table. I appreciate any help or suggestion. Thanks oyu Bils
6
61574
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 same structure as follows Keycolumns ========== Material
16
3868
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 table, or perhaps bytes, being updated where the engine just decides, screw it, i'll just make a new one. surfed this group and google, but couldn't find anything. the context: we have some java folk who like to parametize/
1
4969
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 table schema: Column 1 Name: Number Type: VARCHAR Column 2 Name: Street Type: VARCHAR Column 3 Name: Phone Type: VARCHAR Column 4 Name: Comments Type: LONGCHAR Column 5 Name: Pets Type: VARCHAR
7
6665
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 checked, and the insert works fine (tried to use it from access)... im using visual C# express 2k5... what could be wrong? thanks!
7
28745
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 (Tournament, MemberName, Score) VALUES (vtournament, vMemberName, vScore) SELECT ID, Tournament, MemberName, Score FROM Tournament WHERE (ID = @@IDENTITY);"
0
14418
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 be greater than 255 characters. 2. I have an access database. I link (not import) to the contents of the excel spreadsheet. In the design view in access, Column A has the data type "memo".
6
3455
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 using MS-Access 2000 database table for this app. Note that the datatype of all the fields mentioned above are Text. Apart from the above columns, there's another column in the DB table named 'RegDateTime' whose datatype is Date/Time which is...
2
2017
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 paramaters at the end. Is there a limitation on the size that a Query can be? Can there only be so many characters, including the column names, in a query? How can I get around this? Do I have to insert the data for half the form, and then get...
0
8565
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
9113
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8822
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...
1
6488
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5838
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
4577
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2997
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
2269
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1971
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.