mljonzs
Posts: 124
|
| Posted: 09/22/2006, 12:41 PM |
|
Can someone tell me how to get rid of the following??:
When data not found I get
Error: Warning: Null value is eliminated by an aggregate or other SET operation. (Microsoft OLE DB Provider for SQL Server)
When I run the same SQL statement directly in SQL Server's Query Analyzer tool I do not get any errors so I'm struggling trying to figure out what to adjust in my CodeCharge file to get rid of the error message. The table in use here is a view that joins data from three tables so I'm wondering if that is part of the problem.
I've tried using the IsNull function in the Datasource for all values but that doesn't work either. Can someone offer some insight? I can provide more information if needed. Oddly enough too, this error doesn't come up EVERY time no records are found and I can't pinpoint any one thing that occurs when it does come up??
HELP!!
_________________
What does not begin WITH God, will end in failure!
|
 |
 |
mljonzs
Posts: 124
|
| Posted: 09/22/2006, 1:55 PM |
|
Hello - Once again, after I posted my problem, I found the solution.
In case anyone is interested in the future, the problem was an SQL Server issue after all. Due to the way my view is built, SQL Server may display the warning message when ANSI_WARNINGS is set to ON. The solution was to turn it off.
I didn't want to change our SQL Server settings so I did the following in my Code Charge application and the warning message has gone away.
In the BeforeBuildSelect of my grid, I added the following code:
SList.DataSource.SQL = "SET ANSI_WARNINGS OFF" & SList.DataSource.SQL
Then, in the BeforeExecuteSelect of my grid I added the following code:
SList.DataSource.SQL = SList.DataSource.SQL & " SET ANSI_WARNINGS ON"
Now my codecharge pages display normally whether the searches find data or not.
_________________
What does not begin WITH God, will end in failure!
|
 |
 |
|