ReportPortal
ReportPortal
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ReportPortal General Forum
 Report Portal General Issues
 sql report unable to retrieve data for one column
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

rcdba

6 Posts

Posted - 06/08/2005 :  07:37:20  Show Profile  Reply with Quote
We have a column called insert_time in on of the tables. If I do a 'select * from that table' I can see this column in the result set. However if I try 'select insert_time from table A', nothing is retrieved. Same sql in Query Analyser works fine.

Is insert_time a reserved word? Any tips?

RC

admin

1646 Posts

Posted - 06/08/2005 :  19:21:03  Show Profile  Reply with Quote
Yes, delete, update and insert are prohibited words. This rule is defined in CreateTable() in SqlReport.vb
Go to Top of Page

rcdba

6 Posts

Posted - 06/09/2005 :  06:16:19  Show Profile  Reply with Quote
Igor

The word used here is INSERT_TIME. Also the sql works fine in query analyzer.

Thx
Go to Top of Page

rcdba

6 Posts

Posted - 06/09/2005 :  06:30:44  Show Profile  Reply with Quote
I created a table Test with 2 columns called A and insert_time. Select * from Test works but not select insert_time from Test. Is insert_time a reserved word for report portal?

Rc
Go to Top of Page

admin

1646 Posts

Posted - 06/09/2005 :  19:36:34  Show Profile  Reply with Quote
I understand your frustration. The next build will not have such a restriction.
Go to Top of Page

ravibala

7 Posts

Posted - 06/10/2005 :  09:12:09  Show Profile  Reply with Quote
Any SQL query that contains the word with insert, update, delete (like updatedby,deletedby,insertedby, insert_time,updateTime) are not supported by ReportPortal. The code i_query.asp or SqlReport.vb restricts them. Please consider this scenario while you release next version.
-Ravi.
Go to Top of Page

admin

1646 Posts

Posted - 06/12/2005 :  16:04:57  Show Profile  Reply with Quote
Try the latest Build 44.
Go to Top of Page

ravibala

7 Posts

Posted - 06/14/2005 :  15:49:32  Show Profile  Reply with Quote
Igor - the build #44 allows to insert or delete or update the data through the SQL design window in "Design SQL Report". It throws error while testing these queries but insertion, deletion, updation are done before throwing error.
-Ravi.
Go to Top of Page

admin

1646 Posts

Posted - 06/14/2005 :  19:28:10  Show Profile  Reply with Quote
In build #44 Report Portal no longer tries to suppress queries with insert, delete and update word in them. You would have to use SQL server security to restrict such access if you want to.

What is the error that you get now?
Go to Top of Page

ravibala

7 Posts

Posted - 06/15/2005 :  07:38:02  Show Profile  Reply with Quote
The Error I got while running the following test queries in SQL Report Design mode:
INSERT INTO QueryFolder (FolderName,IsPublic,ApproveType) VALUES ('Test Reports',0,1)
UPDATE QueryFolder FolderName='Test' WHERE FolderName='Test Reports'
DELETE FROM QueryFolder WHERE FolderName='Test'

[
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 162:<%End If%>
Line 163:
Line 164:<%=CreateTable(sSqlSource, Request.Form.Item("orderBy"))%>
Line 165:
Line 166:</form>

Source File: D:\App\Web\ReportPortal\sql\query.aspx Line: 164
]
-Ravi.

Edited by - ravibala on 06/15/2005 07:45:38
Go to Top of Page

admin

1646 Posts

Posted - 06/15/2005 :  20:19:54  Show Profile  Reply with Quote
Ravi,

The SQL you supply must return a recordset. What are you trying to accomplish by running INSERT, UPDATE or DELETE queries?
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
ReportPortal © 2000-2002 Snitz Communications Go To Top Of Page