[Solved] Failed to convert parameter value from a SqlParameter to a String


The ExecuteDataSet call takes the actual parameter values, not SqlParameter objects. Change it to simply do:

var ds1 = db.ExecuteDataSet("Getmagesbylot2", "Bob123457");

You might also want to check that you’ve spelled the SP correctly, maybe it should be GetImagesByLot2.

2

solved Failed to convert parameter value from a SqlParameter to a String