0

I'm working on a several C# application, working with an SQL Server database, via Telerik OpenAccess. When an Exception is raised, the interpreted SQL query shows question marks instead of actual values. Hereby some examples of source code and exception messages:

Source code (random examples):

int count = database.GetData<Order>().Where(o => (o.Status == Waiting) && 
                                                  o.Name == plane.Name).Count();
List<Order> OrderList = database.GetData<Order>().Where(o => o.Name == Source && 
                                                             (o.Status == Active || 
                                                              o.Status == Waiting)).ToList();
...

Those objects can be modified, like OrderList.RemoveAll() or Order.Status = Finished.

Sometimes, during the "committing" of the modifications to those objects, something goes wrong:

database.SaveChanges(); // commit the changes to the objects in database

In the logs, I see following exception messages (also random examples):

Telerik.OpenAccess.Exceptions.OptimisticVerificationException: Row not found: GenericOID@11e493f2 Order Id=3950
DELETE FROM [Orders] WHERE [Id] = ?

Telerik.OpenAccess.Exceptions.OptimisticVerificationException: Row not found: GenericOID@39979f8d Section Id=1613
UPDATE [Locations] SET [ChangedOn] = ?, [Reservations] = ? WHERE [Id] = ? AND [ChangedOn] = ?

Telerik.OpenAccess.Exceptions.DataStoreException: Insert of '1454555061-' failed: ...
declare @generated_ids table([Id] bigint)
insert [Alarms] ([Area], [Code], [Date], [By], [Details], [Producer], [ResolveDate]
output inserted.[Id] into @generated_ids 
 VALUES (?, ?, ?, ?, ?, ?, ?)

You clearly see the question marks: the values are replaced by question marks, so I have no idea which values are to be selected, updated, removed, ...

At the end of each of those exception messages, there always is the following sentence:

(set event logging to all to see parameter values)

What does this mean? What is event logging and how can I set it in order to see actual values instead of question marks in the interpreted SQL queries?

Martin Smith
  • 438,706
  • 87
  • 741
  • 845
Dominique
  • 16,450
  • 15
  • 56
  • 112
  • @Martin, when I wrote the question I got the remark that, when asking an SQL-related question, the database technology needs to be added. In top of this, I'm dealing here with Telerik OpenAccess technology, making a link with SQL-server. The issue I'm mentioning might maybe only occur with that DB technology, so I prefer keeping it. – Dominique Jun 29 '23 at 11:21
  • You shouldn't even have the SQL tag. Your question is purely about how to set an option in Telerik. There is no question about SQL syntax or anything to do on the SQL Server side – Martin Smith Jun 29 '23 at 11:29
  • @MartinSmith: Indeed: it's about the option to modify SQL-query display for an SQL-Server related application :-) – Dominique Jun 29 '23 at 11:31

0 Answers0