Skip to content

Tag: c#

Retrieve Sqlite table data in C++

I have the code as below. I am trying to simply get data from a table i have already created. How do i get the data in the array p_fields that is defined in the callback function into a variable in …

C# SqlReader issue

I’am posting on this forum for the first time . and I really hope I can find some help . What I’am doing is load about … 1000 Value (example) from SQL and I’am doing it just fine . the query for example is : Select Value from DatabaseA.dbo.Values that “Value” ==> decimal…

Sql Command Not Working

I wrote the following code, but nothing is being inserted into the database. I tried changing the SA password in the connection string to something incorrect and the code isn’t catching the exception. What am I doing wrong? Answer As stated by the OP in the comments. Once the try-catch was resolved it w…

Stored procedure returns int instead of result set

I have a stored procedure that contains dynamic select. Something like this: In SSMS the stored procedure runs fine and shows result set. In C# using Entity Framework it shows returning an int instead of IEnumerable? Generated function for usp_GetTestRecords Answer Entity Framework can’t tell what your …

update data with connected ado.net layer

I’m trying to perform update operation on winform using connected ado.net layer. here’s the code using this query I’m getting exception $exception {“Dynamic SQL ErrorrnSQL error code = -104rnToken unknown – line 1, column 15rn(“} System.Exception {FirebirdSql.Data.FirebirdC…

LINQ to SQL, select from an inheritted class

Using LINQ to SQL and Object Relational Designing; Let’s say we have a class Animal with two inherited classes, named Cat and Dog. We can load the “Animal” class and its properties easily: However, when trying to load Cat or Dog, dataContext has the attribute of neither Cats nor Dogs. How is…