Showing posts with label returns. Show all posts
Showing posts with label returns. Show all posts

Thursday, March 29, 2012

Data files from Database Object

The database object contains a member 'get_LogFiles' that returns a nice collection of the database's logfiles. I can't seem to find the comparable member to return the collection of datafiles. If someone can point me in the right direction, I would be most grateful

That's because log files do not reside in filegroups.

Check out the filegroup property, this contains a collection of data files.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

sql

Thursday, March 22, 2012

data driven subscription does not work

I defined a data driven subscription based on a query which returns a list of compagnies (90). For each one, the subcription has to fire a report which extracts the order for the compagny.

After lauching the subcription (apply button , the subscription status is Processed 0 for 90, 0 errors

I do not get any error message.

The report works fine via a subscription base on calendar (with a compagny by default), but not via the data driven subcription.

What could be the reason of this pb ?

By advance thanks

Georges

DId you have a look in the log files ? If the information gven there is not sufficient you can turn on verbose logging, which can be either turned on via the GUI (in SQL Server 2005) or by edition the .config file.

Also make sure that you retrieval process / query doesn′t create any locks on the table.


HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||

I tuned on verbose the log, but nothing special that could help me, may be this extrat.

String was not recognized as a valid Boolean. from the ReportServerService file

Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.Deliver(Notification notification)
ReportingServicesService!library!b7c!05/27/2006-21:49:13:: Data Driven Notification for activation id e9779dcd-c025-4c70-bdad-957582640df2 was saved.
ReportingServicesService!library!b7c!05/27/2006-21:49:13:: Status: Failure writing file NorthWind : String was not recognized as a valid Boolean.
ReportingServicesService!dbpolling!b7c!05/27/2006-21:49:13:: NotificationPolling finished processing item b2f499cf-11d1-4a72-ad46-5b15335c4dca
ReportingServicesService!dbpolling!b20!27/05/2006-21:49:13:: NotificationPolling processing 1 more items. 1 Total items in internal queue.
ReportingServicesService!dbpolling!2f4!05/27/2006-21:49:13:: NotificationPolling processing item d62cfef7-babb-45b5-89d3-8e51fab3b995
ReportingServicesService!library!2f4!05/27/2006-21:49:13:: v VERBOSE: Transaction begin.
ReportingServicesService!chunks!2f4!05/27/2006-21:49:13:: v VERBOSE: ### ReportSnapshot(359966ad-f99e-4d32-a0eb-17696e8d0651) constructor of existing snapshot.
ReportingServicesService!chunks!2f4!05/27/2006-21:49:13:: v VERBOSE: ### ReportSnapshot(43b6cae4-0795-4c73-8e6c-8a98a0eb708c) constructor of existing snapshot.
ReportingServicesService!runningjobs!2f4!05/27/2006-21:49:13:: v VERBOSE: ThreadJobContext.BeginCancelableState
ReportingServicesService!chunks!2f4!05/27/2006-21:49:13:: v VERBOSE: ### GetReportChunk('Main', Main) this=43b6cae4-0795-4c73-8e6c-8a98a0eb708c, #ReadChunks=0, #WriteChunks=0
ReportingServicesService!chunks!2f4!05/27/2006-21:49:13:: v VERBOSE: ### ChunkWriteStream - constructor(43b6cae4-0795-4c73-8e6c-8a98a0eb708c, 'Main', 0)
ReportingServicesService!chunks!2f4!05/27/2006-21:49:13:: v VERBOSE: ### ChunkReadStream - constructor(43b6cae4-0795-4c73-8e6c-8a98a0eb708c, 'Main', 0)
ReportingServicesService!chunks!2f4!05/27/2006-21:49:13:: v VERBOSE: ### GetChunkPointerAndLength(43b6cae4-0795-4c73-8e6c-8a98a0eb708c, Main, 0)
ReportingServicesService!library!2f4!05/27/2006-21:49:13:: v VERBOSE: Transaction begin.
ReportingServicesService!chunks!2f4!05/27/2006-21:49:13:: v VERBOSE: ### ChunkReadStream.Close() - closing... id=43b6cae4-0795-4c73-8e6c-8a98a0eb708c, name='Main'
ReportingServicesService!library!2f4!05/27/2006-21:49:13:: v VERBOSE: Transaction commit.
ReportingServicesService!chunks!2f4!05/27/2006-21:49:13:: v VERBOSE: ### ChunkReadStream - Closed! id=43b6cae4-0795-4c73-8e6c-8a98a0eb708c, name='Main'
ReportingServicesService!chunks!2f4!05/27/2006-21:49:13:: v VERBOSE: ### GetReportChunk('Main', Main) this=43b6cae4-0795-4c73-8e6c-8a98a0eb708c, #ReadChunks=1, #WriteChunks=0
ReportingServicesService!chunks!2f4!05/27/2006-21:49:13:: v VERBOSE: ### ChunkWriteStream - constructor(43b6cae4-0795-4c73-8e6c-8a98a0eb708c, 'Main', 0)
ReportingServicesService!chunks!2f4!05/27/2006-21:49:13:: v VERBOSE: ### ChunkReadStream - constructor(43b6cae4-0795-4c73-8e6c-8a98a0eb708c, 'Main', 0)
ReportingServicesService!chunks!2f4!05/27/2006-21:49:13:: v VERBOSE: ### GetChunkPointerAndLength(43b6cae4-0795-4c73-8e6c-8a98a0eb708c, Main, 0)
ReportingServicesService!library!2f4!05/27/2006-21:49:13:: v VERBOSE: Transaction begin.
ReportingServicesService!chunks!2f4!05/27/2006-21:49:13:: v VERBOSE: ### ChunkReadStream.Close() - closing... id=43b6cae4-0795-4c73-8e6c-8a98a0eb708c, name='Main'
ReportingServicesService!library!2f4!05/27/2006-21:49:13:: v VERBOSE: Transaction commit.
ReportingServicesService!chunks!2f4!05/27/2006-21:49:13:: v VERBOSE: ### ChunkReadStream - Closed! id=43b6cae4-0795-4c73-8e6c-8a98a0eb708c, name='Main'
ReportingServicesService!runningjobs!2f4!05/27/2006-21:49:13:: v VERBOSE: ThreadJobContext.EndCancelableState
ReportingServicesService!runningjobs!2f4!05/27/2006-21:49:13:: v VERBOSE: ThreadJobContext.WaitForCancelException entered
ReportingServicesService!runningjobs!2f4!05/27/2006-21:49:13:: v VERBOSE: ThreadJobContext.WaitForCancelException finished
ReportingServicesService!runningjobs!2f4!05/27/2006-21:49:13:: v VERBOSE: RunningJobList.RemoveJob: uljnfsigggboaxb5liswsa45 was removed
ReportingServicesService!library!2f4!05/27/2006-21:49:13:: v VERBOSE: Transaction commit.
ReportingServicesService!library!2f4!05/27/2006-21:49:13:: v VERBOSE: Call to ListProviders: type (Render).
ReportingServicesService!library!2f4!05/27/2006-21:49:13:: v VERBOSE: Call to ListProviders completed.
ReportingServicesService!crypto!2f4!05/27/2006-21:49:13:: v VERBOSE: Starting crypto operation DBUnProtectData
ReportingServicesService!crypto!2f4!05/27/2006-21:49:13:: v VERBOSE: Completed crypto operation DBUnProtectData
ReportingServicesService!crypto!2f4!05/27/2006-21:49:13:: v VERBOSE: Starting crypto operation DBUnProtectData
ReportingServicesService!crypto!2f4!05/27/2006-21:49:13:: v VERBOSE: Completed crypto operation DBUnProtectData
ReportingServicesService!notification!2f4!05/27/2006-21:49:13:: Handling notification of subscription to report NorthWind_multisite via delivery provider Report Server FileShare
ReportingServicesService!library!2f4!05/27/2006-21:49:13:: v VERBOSE: Call to ListProviders: type (Render).
ReportingServicesService!library!2f4!05/27/2006-21:49:13:: v VERBOSE: Call to ListProviders completed.
ReportingServicesService!subscription!2f4!05/27/2006-21:49:13:: System.FormatException: String was not recognized as a valid Boolean.
at System.Boolean.Parse(String value)
at Microsoft.ReportingServices.FileShareDeliveryProvider.SubscriptionData.FromSettings(Setting[] settings)
at Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.Deliver(Notification notification)

|||In the data driven subscriptions, are you sure that you have all boolean values which are configurable through the query of the datasource set to either true or false ? Otherwise the reporting service can not convert if you map the "Include Report" property to "SomeCustomerNameValue". You have to make sure that the data is consistent through all your available data, otherwise it can be that the subscriptions breaks.

HTH, jens Suessmeyer.

http://www.sqlserver2005.de
|||

This is the query I defined. The only parameter I pass to the report is companyname. The others are defined via the subcription tab (path, report name, user, password ...)

Is my query not correct ? How can I find the wrong parameter ?

My query :

select companyname from customers

|||

Hi,

the query seems ok, perhaps you check the other settings which might be not set all appropiate. But I hope you don′t you the companyname in a column / property of the scheduled report which expects a boolean value.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||

I found the raison of the problem. It was the file suffix property (True/false) I set up to a wrong value !

Data Driven Published Report - Not displaying recipients

I'm setting up my first data driven published report. I have a very simple
query that goes out and returns a list of email recipients. I enter my SQL,
then click "validate" and the server says that it has successfully validated
my query. This SHOULD allow the fields in the subsequent form to be
populated with my returned field list. However, the "Database Fields" drop
down in the delivery extension form only shows one blank line. When i select
that line, i get the error "Blank database field names cannot be used"
Where did my field names go?
TIA,
--
Brian Grant
Senior Programmer
SI International
www.si-intl.comMake sure that the query has a column name for the email recipients. You
may need to add an 'As suchandsuch' to get a column name.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"G" <brian.grant@.si-intl-kc.com> wrote in message
news:#e75$ashEHA.3632@.TK2MSFTNGP09.phx.gbl...
> I'm setting up my first data driven published report. I have a very simple
> query that goes out and returns a list of email recipients. I enter my
SQL,
> then click "validate" and the server says that it has successfully
validated
> my query. This SHOULD allow the fields in the subsequent form to be
> populated with my returned field list. However, the "Database Fields" drop
> down in the delivery extension form only shows one blank line. When i
select
> that line, i get the error "Blank database field names cannot be used"
> Where did my field names go?
> TIA,
> --
> Brian Grant
> Senior Programmer
> SI International
> www.si-intl.com
>|||Thanks for the reply Daniel.
Aliasing my one returned "email_address" field was something i tried, but to
no avail. My query simply returns one field, "email_address". I've also
validated that the query correctly returns 3 records when ran directly
against the database.
The database is Informix, using ODBC for connections. It validates just
fine, still no fields showing up though. This is looking more and more like
a bug.
Any other ideas?
Thanks,
Brian
"Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
news:OtWODUthEHA.2544@.TK2MSFTNGP10.phx.gbl...
> Make sure that the query has a column name for the email recipients. You
> may need to add an 'As suchandsuch' to get a column name.
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "G" <brian.grant@.si-intl-kc.com> wrote in message
> news:#e75$ashEHA.3632@.TK2MSFTNGP09.phx.gbl...
> > I'm setting up my first data driven published report. I have a very
simple
> > query that goes out and returns a list of email recipients. I enter my
> SQL,
> > then click "validate" and the server says that it has successfully
> validated
> > my query. This SHOULD allow the fields in the subsequent form to be
> > populated with my returned field list. However, the "Database Fields"
drop
> > down in the delivery extension form only shows one blank line. When i
> select
> > that line, i get the error "Blank database field names cannot be used"
> >
> > Where did my field names go?
> >
> > TIA,
> >
> > --
> > Brian Grant
> > Senior Programmer
> > SI International
> > www.si-intl.com
> >
> >
>|||Update: When I moved the date into a SQL Server database, everything worked
just fine. So, the problem seems to only occurr when using an ODBC
connection to get the list of recipients.
"Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
news:OtWODUthEHA.2544@.TK2MSFTNGP10.phx.gbl...
> Make sure that the query has a column name for the email recipients. You
> may need to add an 'As suchandsuch' to get a column name.
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "G" <brian.grant@.si-intl-kc.com> wrote in message
> news:#e75$ashEHA.3632@.TK2MSFTNGP09.phx.gbl...
> > I'm setting up my first data driven published report. I have a very
simple
> > query that goes out and returns a list of email recipients. I enter my
> SQL,
> > then click "validate" and the server says that it has successfully
> validated
> > my query. This SHOULD allow the fields in the subsequent form to be
> > populated with my returned field list. However, the "Database Fields"
drop
> > down in the delivery extension form only shows one blank line. When i
> select
> > that line, i get the error "Blank database field names cannot be used"
> >
> > Where did my field names go?
> >
> > TIA,
> >
> > --
> > Brian Grant
> > Senior Programmer
> > SI International
> > www.si-intl.com
> >
> >
>

Thursday, March 8, 2012

Data binding to a stored procedure that returns two result sets

Hi there everyone. I have a stored procedure called "PagingTable" that I use for performing searches and specifying how many results to show per 'page' and which page I want to see. This allows me to do my paging on the server-side (the database tier) and only the results that actually get shown on the webpage fly across from my database server to my web server. The code might look something like this:

strSQL = "EXECUTE PagingTable " & _

"@.ItemsPerPage = 10, " & _

"@.CurrentPage = " &CStr(intCurrentPage) &", " & _

"@.TableName = 'Products', " & _

"@.UniqueColumn = 'ItemNumber', " & _

"@.Columns = 'ItemNumber, Description, ListPrice, QtyOnHand', " & _

"@.WhereClause = '" & strSQLWhere &"'"

The problem is the stored procedure actually returns two result sets. The first result set contains information regarding the total number of results founds, the number of pages and the current page. The second result set contains the data to be shown (the columns specified). In 'classic' ASP I did this like this.

'Open the recordset

rsItems.Open strSQL, conn, 0, 1

'Get the values required for drawing the paging table

intCurrentPage = rsItems.Fields("CurrentPage").Value

intTotalPages = rsItems.Fields("TotalPages").Value

intTotalRows = rsItems.Fields("TotalRows").Value

'Advance to the next recordset

Set rsItems = rsItems.NextRecordset

I am trying to do this now in ASP.NET 2.0 using the datasource control and the repeater control. Any idea how I can accomplish two things:

A) Bind the repeater control to the second resultset

B) Build a "pager" of some sort using the values from the first resultset

Hi,

have you tried setting the DataMember property of the repeater ?

|||

Thanks for the quick reply.

I was thinking about that but I don't know what the second result set would be "called". The results come back as if you executed two SELECT statements one after another without a UNION statement in between.

So what would I set the repeater's DataMember property to? Can I use an integer like

repItems.DataMember = 1 (assuming 0 is the first result set)

|||

If you don't specify a name...:

Table1

Table2

...

TableN