-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot Delete #383
Comments
Strange it ought to work, what happens if you try var id = 160; or .Delete(Id: 160) |
I get the same error message in all cases. I even tried creating a stored procedure where I simply pass the ID and the sp deletes the record. I get the same error message. Here is the full error message.
|
Could it be a permissions error or maybe the delete is generating an error? |
I logged in with SSMS using those same credentials to confirm I can delete the record in question. I also verified the stored proc worked before trying to use it with Simple.Data. John On Feb 13, 2016, at 11:29 AM, WayneHiller <notifications@github.commailto:notifications@github.com> wrote: Could it be a permissions error or maybe the delete is generating an error? Reply to this email directly or view it on GitHubhttps://github.com//issues/383#issuecomment-183707250. |
Can you delete the record using vanilla ado.net c# and the same connection string? |
I'll give that a try however, I am working in VB.nethttp://vb.net. John On Feb 15, 2016, at 2:08 AM, Richard Wilde <notifications@github.commailto:notifications@github.com> wrote: Can you delete the record using vanilla ado.nethttp://ado.net c# and the same connection string? Reply to this email directly or view it on GitHubhttps://github.com//issues/383#issuecomment-184106290. |
It works in ADO.net. Here is my code. It is an action in a WebAPI written in VB.net. `
` |
Not sure why the first few lines of code are not formatted as code in my previous post. I thought it was perhaps the apostrophe used as a comment in VB.net so I changed it to // even though it is not syntactially correct in VB. |
There Using |
Ugh! I'm a bonehead. I've been looking at this code too long and just looked over that. Everywhere else in my code I use OpenNamedConnection except for here. Also, because it only errored when I tried the delete statement and not on OpenConnection(dbName) I just assumed that the connection was good. I guess it doesn't try making the connection until some work needs to be done. Sorry for spinning you up over nothing and thanks for your help. |
I am able to read, create, and update records but I cannot delete. I am using DeleteById(160) where the Id is currently hard coded. Here is the message I receive.
I have noticed that others have similar problem but nothing I have tried is working. Again, the connection string works for everything but Delete. My connection string is...
Server=athena;Database=Appil;User Id=ABC;password=def;multipleactiveresultsets=True;
I am accessing the database over VPN - could that be a problem?
The text was updated successfully, but these errors were encountered: