![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am encountering a strange issue which I don't understand. Our .NET application has a query to our UltraLite database. The query simply looks into a table for a certain row based on a varchar ID parameter. The ID parameter is not the primary key. If the row is found, the primary key of the row is supposed to be returned. In actuality, if the row is found, a different row is being returned. The row returned is always the same. I query the database by inserting the query into a ULCommand class and return the result to a ULDataReader class. This technique works without a problem in many other areas of our application. I hardcoded one of the IDs into query to troubleshoot the issue and it is as follows: SELECT c.c_id FROM c_master c WHERE UPPER(c.labeled_id) = 'GLVAAP2' From within the application. this query is returning the wrong c.c_id. I have verified the query should return a different c_id by connecting to a copy of the UltraLite database using Interactive SQL and running the exact same query. There are over 5000 rows in the c_master table and c.c_id is of type numeric and and c.labeled_id is a varchar. Has anyone encountered an issue like this before? Thanks in advance. |
#3
| |||
| |||
|
|
I am encountering a strange issue which I don't understand. Our .NET application has a query to our UltraLite database. The query simply looks into a table for a certain row based on a varchar ID parameter. The ID parameter is not the primary key. If the row is found, the primary key of the row is supposed to be returned. In actuality, if the row is found, a different row is being returned. The row returned is always the same. I query the database by inserting the query into a ULCommand class and return the result to a ULDataReader class. This technique works without a problem in many other areas of our application. I hardcoded one of the IDs into query to troubleshoot the issue and it is as follows: SELECT c.c_id FROM c_master c WHERE UPPER(c.labeled_id) = 'GLVAAP2' From within the application. this query is returning the wrong c.c_id. I have verified the query should return a different c_id by connecting to a copy of the UltraLite database using Interactive SQL and running the exact same query. There are over 5000 rows in the c_master table and c.c_id is of type numeric and and c.labeled_id is a varchar. Has anyone encountered an issue like this before? Thanks in advance. |
#4
| |||
| |||
|
|
I am encountering a strange issue which I don't understand. Our .NET application has a query to our UltraLite database. The query simply looks into a table for a certain row based on a varchar ID parameter. The ID parameter is not the primary key. If the row is found, the primary key of the row is supposed to be returned. In actuality, if the row is found, a different row is being returned. The row returned is always the same. I query the database by inserting the query into a ULCommand class and return the result to a ULDataReader class. This technique works without a problem in many other areas of our application. I hardcoded one of the IDs into query to troubleshoot the issue and it is as follows: SELECT c.c_id FROM c_master c WHERE UPPER(c.labeled_id) = 'GLVAAP2' From within the application. this query is returning the wrong c.c_id. I have verified the query should return a different c_id by connecting to a copy of the UltraLite database using Interactive SQL and running the exact same query. There are over 5000 rows in the c_master table and c.c_id is of type numeric and and c.labeled_id is a varchar. Has anyone encountered an issue like this before? Thanks in advance. |
![]() |
| Thread Tools | |
| Display Modes | |
| |