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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:35:54+00:00 2026-06-15T20:35:54+00:00

I’m using access table I’m using this oleDBManager that includes these public functions: ///

  • 0

I’m using access table

I’m using this oleDBManager that includes these public functions:

/// <summary>
/// Excecutes an SELECT query and returns the data.
/// </summary>
/// <param name="query">the query string</param>
/// <returns>returns an DataTable instance with the recived data from the selection query.</returns>
public DataTable ExcecuteRead(string query) {
    this.link.Open();
    // ---
    this.dataAdapter = new OleDbDataAdapter(query, this.link);
    // ---
    this.dataTable = new DataTable();
    this.dataAdapter.Fill(this.dataTable);
    // ---
    this.link.Close();
    // ---
    return this.dataTable;
}

/// <summary>
/// Returns an HTML table code, with all the rows and the values of the results.
/// </summary>
/// <param name="query">the query string</param>
/// <returns>returns an HTML code as a string</returns>
public string ExcecuteTableRead(string query)
{
    string output = "<table border=\"1\">";
    // ---
    this.dataTable = this.ExcecuteRead(query);
    // ---
    foreach (DataRow row in this.dataTable.Rows)
    {
        output += "<tr>";
        // ---
        foreach (object obj in row.ItemArray)
        {
            output += "<td>" + obj.ToString() + "</td>";
        }
        // ---
        output += "</tr>";
    }
    // ---
    output += "</table>";
    // ---
    return output;
}
/// <summary>
/// Returns an HTML table code, with all the rows and the values of the results.
/// </summary>
/// <param name="query">the query string</param>
/// <param name="max">the maximum number of rows to show</param>
/// <returns>returns an HTML code as a string</returns>
public string ExcecuteTableRead(string query, int max)
{
    int i = 0;
    string output = "<table border=\"1\">";
    // ---
    this.dataTable = this.ExcecuteRead(query);
    // ---
    foreach (DataRow row in this.dataTable.Rows)
    {
        if (i < max)
        {
            output += "<tr>";
            // ---
            foreach (object obj in row.ItemArray)
            {
                output += "<td>" + obj.ToString() + "</td>";
            }
            // ---
            output += "</tr>";
        }
        i++;
    }
    // ---
    output += "</table>";
    // ---
    return output;
}

In my “users” table, I have a “userid”, “username”, “password” and “logins” for each user.
My question is, when the user logins (I have the username and the password), how can I get the value of his ‘logins’ column?
Would be even better if I could set it into an int (if it matters, I’ve set the “logins” column in access to ‘number’ from ‘text’.

Edit: what I’m trying to do is to update the number of times the user has logged in. If there’s a better way, please tell me.

  • 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-15T20:35:55+00:00Added an answer on June 15, 2026 at 8:35 pm

    answer:

    So, although no one answered me, i’ve managed to learn it myself:

    here is the whole part of the code (username is the name of the user and also a string of it with the same name, logins is the column, users is the table)

    string logins = db.ExcecuteTableRead("SELECT logins FROM users WHERE username='" + username + "'");
    logins = logins.Substring(21, 20);
    logins = Regex.Match(logins, @"\d+").Value;
    int loginsInt = Int32.Parse(logins) + 1;
    int a = db.ExecuteQuery("UPDATE users SET logins='" + loginsInt.ToString() + "' WHERE username='" + username + "'");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I know there's a lot of other questions out there that deal with this
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I am reading a book about Javascript and jQuery and using one of the
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace

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.