Here is my controller code to get data from database.
public JsonResult getACLog()
{
var log = new List<ACLog>();
OdbcCommand command = new OdbcCommand("SELECT fldPrimaryKey, fldCall, fldDateStr, fldTimeOnStr, fldMode, fldState, fldRstR, fldRstS, fldBand FROM tblContacts;");
using (OdbcConnection connection = new OdbcConnection("Driver={Driver do Microsoft Access (*.mdb)};dbq=C:\\Users\\User\\MasterLog.mdb;defaultdir=C:\\Users\\User;driverid=25;fil=MS Access;filedsn=C:\\Users\\User\\MasterLog.mdb.dsn;maxbuffersize=2048;maxscanrows=8;pagetimeout=5;safetransactions=0;threads=3;uid=admin;usercommitsync=Yes"))
{
command.Connection = connection;
connection.Open();
using (var reader = command.ExecuteReader())
{
while (reader.Read())
{
var logger = new ACLog();
logger.box = "false";
logger.fldPrimaryKey = (reader.SafeGetInt(0).ToString());
logger.fldCall = reader.SafeGetString(1);
logger.fldDateStr = reader.SafeGetString(2);
logger.fldTimeOnStr = reader.SafeGetString(3);
logger.fldMode = reader.SafeGetString(4);
logger.fldState = reader.SafeGetString(5);
logger.fldRstR = reader.SafeGetString(6);
logger.fldRstS = reader.SafeGetString(7);
logger.fldBand = reader.SafeGetString(8);
log.Add(logger);
}
};
}
return Json(log, JsonRequestBehavior.AllowGet);
}
I can se the data in the "log" statement but I get a popup box with " Local says error". Is there something wrong with my controller routine or is it a handsontable problem. My database has about 17,600 rows.