Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. MS ACCESS PROBLEMS

MS ACCESS PROBLEMS

Scheduled Pinned Locked Moved C#
helpcsharpdatabasequestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jonhbt
    wrote on last edited by
    #1

    I am doing a small windows application using C# which connects to an MS Access Database. I am using OleDb via ADO to interact with the database. when I am trying to get the data from the database I'm being shown this error message "Selected collating sequence not supported by the operating system." I googled the problem but all the results that I have tried failed. Can someone help me about this please? Thanks

    M 1 Reply Last reply
    0
    • J jonhbt

      I am doing a small windows application using C# which connects to an MS Access Database. I am using OleDb via ADO to interact with the database. when I am trying to get the data from the database I'm being shown this error message "Selected collating sequence not supported by the operating system." I googled the problem but all the results that I have tried failed. Can someone help me about this please? Thanks

      M Offline
      M Offline
      MumbleB
      wrote on last edited by
      #2

      Can you post the connection and selection code please? We may be able to help if we see the code that you using!!

      Excellence is doing ordinary things extraordinarily well.

      J 1 Reply Last reply
      0
      • M MumbleB

        Can you post the connection and selection code please? We may be able to help if we see the code that you using!!

        Excellence is doing ordinary things extraordinarily well.

        J Offline
        J Offline
        jonhbt
        wrote on last edited by
        #3

        This is the method that I am calling to get the data

        public DataTable GetData(string fromDate, string toDate, string connectionString)
        {
        DataTable dt = new DataTable();

                OleDbConnection con = new OleDbConnection(connectionString);
                OleDbCommand cmd = new OleDbCommand();
                try
                {
                    cmd.CommandText = String.Format("SELECT CHECKINOUT.CHECKTIME, CHECKINOUT.CHECKTYPE, USERINFO.TITLE FROM CHECKINOUT INNER JOIN USERINFO ON CHECKINOUT.USERID = USERINFO.USERID WHERE (((CHECKINOUT.CHECKTIME) Between #{0}# And #{1}#));", fromDate, toDate);
                    cmd.Connection = con;
                    con.Open();
                    OleDbDataAdapter dataAdapter = new OleDbDataAdapter(cmd);
                    dataAdapter.Fill(dt);
                }
                catch (Exception ex)
                {
                    throw ex;
                    dt = null;
                }
                finally { con.Close(); }
                return dt;
            }
        
        M 1 Reply Last reply
        0
        • J jonhbt

          This is the method that I am calling to get the data

          public DataTable GetData(string fromDate, string toDate, string connectionString)
          {
          DataTable dt = new DataTable();

                  OleDbConnection con = new OleDbConnection(connectionString);
                  OleDbCommand cmd = new OleDbCommand();
                  try
                  {
                      cmd.CommandText = String.Format("SELECT CHECKINOUT.CHECKTIME, CHECKINOUT.CHECKTYPE, USERINFO.TITLE FROM CHECKINOUT INNER JOIN USERINFO ON CHECKINOUT.USERID = USERINFO.USERID WHERE (((CHECKINOUT.CHECKTIME) Between #{0}# And #{1}#));", fromDate, toDate);
                      cmd.Connection = con;
                      con.Open();
                      OleDbDataAdapter dataAdapter = new OleDbDataAdapter(cmd);
                      dataAdapter.Fill(dt);
                  }
                  catch (Exception ex)
                  {
                      throw ex;
                      dt = null;
                  }
                  finally { con.Close(); }
                  return dt;
              }
          
          M Offline
          M Offline
          MumbleB
          wrote on last edited by
          #4

          Have a look at the following post[^]. Maybe this will give you some insight into a solution. I think it might be something to with the BETWEEN statement.

          Excellence is doing ordinary things extraordinarily well.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups