Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8165853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:39:50+00:00 2026-06-06T19:39:50+00:00

Getting a strange error when trying to insert data into an Access database using

  • 0

Getting a strange error when trying to insert data into an Access database using parameters. the line where I am getting a problem is :-

                thisCommand.CommandText = "INSERT INTO Events (Venue_ID, Date_Start, Date_End, Time_Start, Time_End, Name, Description, Event_Type, Buy_Tickets_URL) VALUES (@VenID, @DStart, @DEnd, @evTime, @evTime, @Name, @Des, @EvType, @SysUrl);";

                //Other Parameters already inserted here
                string desc = GetDesc(rec.EvName);
                thisCommand.Parameters.AddWithValue("@Des", desc);
                thisCommand.ExecuteNonQuery();

None of the other parameters cause a problem but when trying to insert data to the description field I get a database exception saying the field is too small to accept the amount of data. The problem is my program is only trying to insert 3 characters when it throws the error and the Description field is a memo so should be able to hold up to 65000+ characters. When inserting a value manually in the CommandText everything works fine so it must be something to do with the parameter properties.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T19:39:52+00:00Added an answer on June 6, 2026 at 7:39 pm

    Parameter names are just a guide for you, for example, this runs, note that all parameters have the same name! Note also that the reserved word Name is escaped by square brackets.

        thisCommand.CommandText = "INSERT INTO Events (Venue_ID, Date_Start, " +
        "Date_End, [Name], Description, Event_Type, Buy_Tickets_URL) " +
        "VALUES (@VenID, @DStart, @DEnd, @Name, @Des, @EvType, @SysUrl);";
    
    
        thisCommand.Parameters.AddWithValue("@Des", 1);
        thisCommand.Parameters.AddWithValue("@Des", DateTime.Now.Date);
        thisCommand.Parameters.AddWithValue("@Des", DateTime.Now.Date);
        thisCommand.Parameters.AddWithValue("@Des", "abc");
        thisCommand.Parameters.AddWithValue("@Des", "abc");
        thisCommand.Parameters.AddWithValue("@Des", 1);
        thisCommand.Parameters.AddWithValue("@Des", "abc");
    

    Reserved words

    • Jet
    • ACE
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to scrape data from totalfilm.com using YQL but I'm getting a strange error:
I'm getting a strange mysql error: when trying to insert a row into a
I'm trying to insert dict values into database. But i'm getting error . here
I am getting strange errors while trying to create a simple database using isql
I am getting a strange error message from the core data when trying to
Getting a strange error when trying to output some data as a response to
I'm getting this strange error message when trying to clone or pull from git.
Trying to install pear package and keep getting this strange error. Can you shed
I am getting a strange error using jQuery 1.3.2 and Firefox. I have created
I'm using Compass to generate linear gradients but I'm getting a strange error indicating

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.