Hey All

(just posted this in the forum - thought it might not get picked up there so
reposted here - hope that's OK?)

This code throws an exception:

"Method may only be called on a Type for which Type.IsGenericParameter is
true."

[code]

[...]
SqlDataAdapter adapter = new SqlDataAdapter(command);
            DataSet ds = new DataSet();
            adapter.Fill(ds, "BudgetMonitorSumReport");

            totalRecords = ds.Tables[0].Rows.Count;

            try
            {
                message = "{\"total\": \"" + totalRecords + "\",
\"results\":" + new NewtonsoftJSONSerializer().Serialize(ds) + "}";


            }
            catch (Exception exc)
            {
                if (log.IsErrorEnabled)
                {
                    log.Error("Failed converting data to JSON format",
exc);
                }
            }

            RenderText(message);
[/code]

It's a standard dataset - i tried using just the datatable but that yields
the same results.

I just want to be able to send back the dataset as json.



w://

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to castle-project-users@googlegroups.com
To unsubscribe from this group, send email to 
castle-project-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to