MS ACCESS PROBLEMS
-
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
-
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
-
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.
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; }
-
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; }