Showing posts with label updated. Show all posts
Showing posts with label updated. Show all posts

Monday, March 12, 2012

Query Engine Error

Hi
We have a table change in the DB2 database. I mean an old table
is being replaced with a new one. I updated the reports by
replacing the old table column names with the new ones in all
the reports. all the reports are running fine. there's one
report which is giving Query Engine Error. it pops up a window
which says 'The Query can not be performed. An illegal link
cycle was detected'.Please help me in finding out the issue.
Thanks in Advance

Regards
MadhaviDid you verify database inside your report file?|||I did verify. And its not showing any error. But i am not able to see the SQL also.
When i say 'Show SQL' i get the same error as when i run the report.|||I did verify. And its not showing any error. But i am not able to see the SQL also.
When i say 'Show SQL' i get the same error as when i run the report.
If you couldn't see the SQL statement, it means that table structure inside
rpt file corrupted. You need to recreate them.

Wednesday, March 7, 2012

Query Confusion -- Please help

I have three categories (cat1, cat2, cat3) that are updated each month at different times.
Cat1 may have multiple entries for the month.
I need monthly totals for each category and a monthly grand total for all categories.
Here is my problem. We have to start with a certain balance and continue from there. The balance for the end of January is the beginning value for February.
SELECT Sum(Transactions.cat1) AS SumOfcat1, Sum(Transactions.cat3) AS SumOfcat3, Sum(Transactions.cat2) AS SumOfcat2, Transactions.monthID, (sumofcat1+sumofcat2+sumofcat3) AS MonthlyTotal
FROM Transactions
GROUP BY Transactions.monthID
ORDER BY Transactions.monthID;
The above query returns the following
SumofCat1 SumofCat2 SumofCat3 MonthID MonthlyTotal
-- -- -- -- --
90 0 50 1 140
58 9 108 2 175
50 100 100 3 250
I need another field called GrandTotal that shows as follows
GrandTotal
140
315
575
Please help. I looked at the http://www.databasejournal.com/featu...le.php/3112381 site with the grand total tutorial, but can't get it to work in access.
hi jason,
Try following query:
select
SumOfcat1, SumOfcat3, SumOfcat2, monthID , (sumofcat1+sumofcat2+sumofcat3)
AS MonthlyTotal ,
(select sum(cat1)+sum(cat2)+sum(cat3)
from transactions a
where a.monthid <= x.monthid ) 'grandtotal'
from
(SELECT Sum(Transactions.cat1) AS SumOfcat1, Sum(Transactions.cat3) AS
SumOfcat3,
Sum(Transactions.cat2) AS SumOfcat2, monthID
FROM Transactions
GROUP BY monthID)X
ORDER BY monthID;
Vishal Parkar
vgparkar@.yahoo.co.in

Query cannot be updated because the FROM clause

Hi everybody,

I have a problem. My provider(ISP) is supporting SQL Native Client driver and my forum supplier is only supporting SQLOLEDB. I am trying to access our sql2005 DB located at our ISP.

I have changed this line:

strCon = "Provider=SQLOLEDB;Connection Timeout=90;" & strCon

To:
strCon = "Driver={SQL Native Client};Connection Timeout=90;" & strCon

Now I can access the database, but when I am trying to loging I get this error:

Server Error in Forum Application
An error has occured while writing to the database.
Please contact the forum administrator.

Support Error Code:- err_SQLServer_loginUser()_update_USR_Code
File Name:- functions_login.asp

Error details:-
Microsoft OLE DB Provider for ODBC Drivers
Query cannot be updated because the FROM clause is not a single simple table name.

What can I do? I am stuck in between and need a solution.....

Regards Gerry!



This is usually because you created an ADODB.Recordset, grabbed a query that JOINed two or more tables, and then attempted to perform an AddNew or Update through the recordset object. To resolve this issue, use an INSERT or UPDATE statement directly against the connection object, and if using SQL Server, use a stored procedure call.|||

"SQL Native Client" contains both a new ODBC driver and OLEDB provider for SQL 2005.

My guess is that the problem is caused by chaning from a straight OLEDB provider to OLEDB for ODBC + SQL Native client ODBC driver. Can you try changing your connect string as follows:

strCon = "Provider=SQLNCLI;Connection Timeout=90;" & strCon

Query cannot be updated because the FROM clause

Hi everybody,

I have a problem. My provider(ISP) is supporting SQL Native Client driver and my forum supplier is only supporting SQLOLEDB. I am trying to access our sql2005 DB located at our ISP.

I have changed this line:

strCon = "Provider=SQLOLEDB;Connection Timeout=90;" & strCon

To:
strCon = "Driver={SQL Native Client};Connection Timeout=90;" & strCon

Now I can access the database, but when I am trying to loging I get this error:

Server Error in Forum Application
An error has occured while writing to the database.
Please contact the forum administrator.

Support Error Code:- err_SQLServer_loginUser()_update_USR_Code
File Name:- functions_login.asp

Error details:-
Microsoft OLE DB Provider for ODBC Drivers
Query cannot be updated because the FROM clause is not a single simple table name.

What can I do? I am stuck in between and need a solution.....

Regards Gerry!



This is usually because you created an ADODB.Recordset, grabbed a query that JOINed two or more tables, and then attempted to perform an AddNew or Update through the recordset object. To resolve this issue, use an INSERT or UPDATE statement directly against the connection object, and if using SQL Server, use a stored procedure call.|||

"SQL Native Client" contains both a new ODBC driver and OLEDB provider for SQL 2005.

My guess is that the problem is caused by chaning from a straight OLEDB provider to OLEDB for ODBC + SQL Native client ODBC driver. Can you try changing your connect string as follows:

strCon = "Provider=SQLNCLI;Connection Timeout=90;" & strCon