2

I started a new project using vb.net and micro ORM DAPPER.NET . Over nuGet I integrated the dapper and dapper.simpleCRUD . My problem is appears when i want to execute some CRUD operations i have a problem with SqlMapper.cs .I do not know whay because I successfully integrated into the project a "dapper.simpleCRUD" extension . What am doing wrong??

ERROR

enter image description here

enter image description here

enter image description here

I try manual to add SqlMapper.cs file and i get this:

enter image description here

  • Double click on that selection to check on Object Browser if there is any class named SqlMapper – felipekm Mar 24 '15 at 19:37
  • No i don't have it? How can i fix this? –  Mar 24 '15 at 19:39
  • You problem is with this reference, try to extract only the DLL from the Path of this Package and then reference it again. – felipekm Mar 24 '15 at 19:43
  • Try to insert SqlMapper.cs to your solution using this url: https://kevingessner.kilnhg.com/Code/Public/Attack-of-the-Clones/MvcMiniProfiler/Files/SampleWeb/Dapper/SqlMapper.cs?rev=c3f12fbd0629&nr= – felipekm Mar 24 '15 at 19:50
  • 1
    The "missing sqlmapper.cs" is just the IDE trying to be more specific about the exception. However, the exception should already have enough information without this - I think you're investigating an unrelated issue. What is the actual exception? – Marc Gravell Mar 24 '15 at 20:12
  • I don't know. When i tray to do this query I have the error that told me the above error Sqlmapper.cs missing . I'm really confused **Dim user = konekcija.Query(Of tOpi)("SELECT OPIS FROM tOpis").ToList** **DataGridView1.DataSource = user** –  Mar 24 '15 at 20:22
  • 1
    that isn't the exception; that is just the IDE getting in your way. Ignore that, and concentrate on finding the exception - it'll be on one of the windows. Worst case: run it outside of the IDE, so you can see the error without the IDE trying to "help" you. Also, if you reply, include @marc in the comment, then I'll get notified :) – Marc Gravell Mar 24 '15 at 23:24
  • @MarcGravell oh yes, that is. I had a problem with the syntax of the query. Thank you, sir . Please write this like answer. I need to mark that question as resolved. :) –  Mar 25 '15 at 00:07

1 Answers1

6

The IDE is simply presenting a confusing UI here. The problem is not that SqlMapper.cs is missing. Rather, some exception has happened (presumably a SQL error), and rather than simply show you the failure, the IDE is attempting to show you the original point where the error is detected as code. Which it doesn't have! Basically, ignore the request for SqlMapper.cs - that is just the IDE having a bad day. What you actually need to do here is to focus on finding the exception. That might be hidden in another window, or it might appear when you click one of the buttons. In the worst case, just run the code outside of the IDE - the IDE can't stick its nose in if it isn't running! You should eventually find the actual exception, which is probably either a ADO.NET connection failure, or invalid SQL being used.

Marc Gravell
  • 1,026,079
  • 266
  • 2,566
  • 2,900