PDA

View Full Version : MSAccess Field Size Problems


Deekman
12-10-2005, 02:40 AM
Ok guys this should be the last question, the site's almost done.

I'm trying to create a field that I can enter large amounts of text into. I'm using Access 2000 to create the database and I'm using a memo field to enter the data into.
I can enter the large amount of text in access itself and it works fine and can be displayed on the edit page.
However when I try to write even the same lengh of text in to it through an online form it crashes.

Any ideas how to fix this?

Brandoe85
12-10-2005, 03:19 AM
Can you post the code and the error message?

Thanks

Deekman
12-10-2005, 03:27 AM
My mistake it's actually when I try to enter certain characters into the field.
It keeps giving me this error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect

/Deekman/news/stories_edit3.asp, line 6


Here is the insert code that i'm using.
<% @language = vbscript %>
<!--#include file="dbconn.inc" -->
<%
querystring = "update story_list set StoryName='" & request("StoryTitle") & "', Rating='" & request("StoryGenre") & "', StoryDescription='" & request("TheStoryDescription") & "' where IdNumber=" & request("theid")

Set RS = conn.execute(querystring)
Response.Redirect("admin.asp?status=correct")
%>

As I said when I enter them into the data base by themselves it works fine however when I go to enter them into it from a form it dies.

Brandoe85
12-10-2005, 03:44 AM
What characters are you entering when it breaks? Does it break everytime, regardless of what you enter? Can you show us what is the output is when you Response.Write(querystring)?

Deekman
12-10-2005, 04:43 AM
I'm sometimes getting this error aswell (don't blame me for the content the site is for a client who wants to have her stories hosted)
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''Yoh and Anna make love for the first time and end up getting a little bundle of joy. or three. Meanwhile, Anna's best friend struggles to keep her boyfriend happy. ' where IdNumber=1'.

/Deekman/news/stories_edit3.asp, line 6

Here's the query string, it fails when trying to put these in:
insert into story_list(StoryName, Rating, StoryDescription) values('What Is Love?','Shaman King - Fiction rated: R - Romance','Yoh and Anna make love for the first time and end up getting a little bundle of joy... or three. Meanwhile, Anna's best friend struggles to keep her boyfriend happy... A story full of shocking twists and sad moments... Is there room for a happy ending?')

Brandoe85
12-10-2005, 05:04 AM
The problem is with your single quotes getting screwed up when they enter something in that has apostophes and such. Heres a link to the sticky at the top of this forum that should fix it for you:

http://www.codingforums.com/showthread.php?t=9843

Good luck

Deekman
12-10-2005, 05:07 AM
Ah ok I was actually thinking that was the problem. Ill give it a go and let you know.
Thanks again.

Deekman
12-10-2005, 07:57 AM
Yep that solved it thanks alot. Finally got this thing all done thanks alot for the help everyone.
(sorry for the double post I thaught I'd hit edit)

Brandoe85
12-11-2005, 02:36 AM
Great! I'm glad you got everything working :thumbsup: