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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:18:49+00:00 2026-06-11T07:18:49+00:00

Everything works fine, except one thing. When i try to pull the username of

  • 0

Everything works fine, except one thing. When i try to pull the username of the one with the highest score, the program fails.

The result that i get is 0 instead of le_user

This is the part of code that act’s weird:

string query = "SELECT * FROM \"Highscore_List\" ORDER BY Highscore_List.score DESC LIMIT 1";
DataTable  recipe = db.GetDataTable(query);
foreach (DataRow r in recipe.Rows)
{
    string old_user = r["user_name"].ToString();
    int oude_topscore = Convert.ToInt32(r["score"]);
}

And the score is right, just the user name not. And when i leave this part of the query

ORDER BY Highscore_List.score DESC LIMIT 1

The result is still the same. So that isn’t the problem.

So what am I doing wrong?

EDIT:

Here is an SQL dump of it:

-- ----------------------------
-- Table structure for "main"."Highscore_List"
-- ----------------------------
DROP TABLE "main"."Highscore_List";
CREATE TABLE "Highscore_List" (
"id"  INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"score"  INTEGER NOT NULL,
"user_name"  INTEGER NOT NULL
);

-- ----------------------------
-- Records of Highscore_List
-- ----------------------------
INSERT INTO "main"."Highscore_List" VALUES (1, 1, 'hui');
INSERT INTO "main"."Highscore_List" VALUES (2, 2, 'Onbekend');
INSERT INTO "main"."Highscore_List" VALUES (3, 3, 'onbekend_tt');
INSERT INTO "main"."Highscore_List" VALUES (4, 2, 'onbekenddd');
INSERT INTO "main"."Highscore_List" VALUES (5, 6, 'le_user');
INSERT INTO "main"."Highscore_List" VALUES (6, 0, 'Onbekend');
  • 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-11T07:18:51+00:00Added an answer on June 11, 2026 at 7:18 am

    You have created your column “user_name” as an integer column.

    Actually, it is ok for SQLite to put text values into an integer column and read it out again as text. However, I’m not familiar with the ADO.NET interface to SQLite. It seems that it reads out “user_name” values as integer which results in the 0 values. I see two ways to solve the problem:

    1. Create the “user_name” column as TEXT
    2. Find a way to tell the ADO.NET-SQLite-bridge that it should interpret the values in the “user_name” column of query results as TEXT
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I implemented this Jquery show/hide code and everything works fine except that the box
i'm using the jquery cookie plugin. Everything works fine except the fact that I
I implemented the Facebook registration on my website. Everything works fine except that suddenly
I am writing a Firefox extension that automatically sorts bookmarks. Everything works fine, except
I've got this site: http://p33.yamandi.com/ Almost everything works fine, except one little annoying thing
I am using CMake to generate Visual Studio projects. Everything works fine except one
I just launched my first MVC3 application and everything works fine except cookies authorisation.
I have installed typo3, templavoila and mapped a template. Everything works fine, except my
Application works fine. I can access everything in debug except for an Array Adapter
Everything works fine, the only problem is that it loads very slow. It takes

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.