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 8755733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:54:47+00:00 2026-06-13T13:54:47+00:00

I am using NHibernate and it is working perfectly except for adding strings to

  • 0

I am using NHibernate and it is working perfectly except for adding strings to the database
when I try to add string using this way

string charname = "Dan";
var account = new Account
{
    Username = charname
};
AccountRepository.Add(account);

it works but when I try to add the string that is read from a stream

string charname = reader.ReadString(false, length + 1);
 var account = new Account
 {
     Username = charname
 };
 AccountRepository.Add(account);

it adds nothing to the table. Can anyone explain why this is happening?

(Even though when printing the value charname it is printed correctly)

  • 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-13T13:54:48+00:00Added an answer on June 13, 2026 at 1:54 pm

    Might be a character appended to the value you want to add that the database is not accepting double check the value you are adding using debugging mode to check what is the actual value is before added to the databse.

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

Sidebar

Related Questions

I have a database table using an enum. This is already working with hibernate
I am using NHibernate for my project. i am quite a beginner at working
i'm trying to get multi tenancy working in my app - using nhibernate integration
I'm working on an intranet MVC web application, using Fluent NHibernate. As everyone knows,
I am using blow code for join in nhibernate, which is working fine. But
Using NHibernate 1.x we encountered this error, suddently, during a nigthly job: 25/06/2012 22:50:59
Im using VS2010, C# 4.0, NHibernate and NUnit in a project Im working on..
In my project I am using NHibernate/FluentNHibernate, and I am working with two entities,
I am relatively new to using Nhibernate but basic things already are working. Now
Up until recently I had a working service using NHibernate 2.0. I have upgraded

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.