Showing posts with label guys. Show all posts
Showing posts with label guys. Show all posts

Sunday, March 25, 2012

Datasets with multiple tables..

hey guys, quick question that i hope someone can help steer me in the correct direction.

i've got a failry large report that gets its data from and XML web service.. the dataset that the webservice returns has 6 tables in it (i'm interested in data from 5 of them).. in order to get my fields to show up correctly in my dataset viewer i've created 5 datasets and use the ElementPath in my query to single out the table i want for each dataset.. this works fine about 50% of the time.. the other 50% of the time it craps out on my because some of the data manipulation that the webservice does causes primary key violations.. is the report making 5 calls to the webservice? if it is, is it sending them in multiple threads.. its the only thing i can think of that would cause my key violations..

my sproc that is dying looks similar to this:

delete from dbo.Charges where contractid = @.contract

insert into dbo.charges (columns.....) values (values)

i can see that it would violate the key if both threads were doing the insert simultaneously(sp)..

now.. is there a way to only make one trip to the webservice and use those results in the report, while still having the fields available in the dataset viewer?

thanks

mike

Yes, RS will execute each DataSet in its own thread if the DataSource is not marked to use a transaction. If your RS DataSource is set to execute in a transaction each DataSet will be executed in order in the same thread. In report designer, you can mark a DataSource to use a transaction by checking the "Use single transaction" box in the Data Source dialog.

However, even if all your DataSets are executed in the same thread, each DataSet will still make a seperate call to the web service to retrieve the data.

John

|||

thanks John.. it works as expected now.. is there anyway that i could prevent all the calls to the webservice? ie have a main dataset with all the tables, then pass that dataset to a subreport for each section that uses a specific table?

thanks again for the quick reply

mike

Datasets in custom code

Hi guys,

is it possible to access my report's datasets from within custom code or pass them as parameters to a custom assembly? I want the dataset itself, not just fields, so i can programmatically look through it for data.

Thanks!

sluggy

This is not directly supported.

There are however some alternative approaches:

* add a list reportitem to the report and inside the list make a call to your custom code/custom assembly function and pass in the fields as parameter values. This will call your function for every row of data of the dataset bound to the list.

* or a more complex but also more powerful option is to use the new CustomReportItem feature in RS 2005 and implement a custom processing control which can examine the processed DataValues inside the CustomReportItem. A starting point with a sample is available here: http://blogs.msdn.com/chrishays/archive/2005/10/04/CustomReportItemSample.aspx

-- Robert

|||Thanks Robert, i will check that solution out, although it is probably overkill for the particular scenario i was dealing with

Wednesday, March 21, 2012

Dataset

hey guys,

I created a dataset using a design view of the MDX query designer. As you know, in the filter pane of the MDX query, there is check box if you want to parameterized your report. When I checked that option, SQL Server created a dataset specifically for the report parameter. So my question is that I can see this dataset in the data tab of the report designer but not in the Report Datasets list. Do you have any idea why this happened?

waiting to hear soon.

Sincerely,

Amde

Report designer will mark MDX parameter datasets as "auto-generated" in the underlying RDL representation:
<rd:AutoGenerated>true</rd:AutoGenerated>

Reasoning: in general the parameter valid value lists of MDX queries are only relevant for parameter selection.

You can still use those datasets by removing the the rd:AutoGenerated element from the dataset in the RDL file (and have it then show up in the dataset list), or by looking up the name and fields of the autogenerated dataset and hand-writing expressions.

-- Robert

|||

Hey Robert,

I really appreciate your assistance. I got the solution. By the way removing the rd:AutoGenerated element from the rdl file didn't help me to see the dataset. What I did is changing the hidden property of the dataset to false. Now I can see the dataset in the list.

Thank you Robert again.

Sincerely,

Amde

|||

Yes you right - I forgot to mention to remove the <rd:Hidden> element.

-- Robert

|||Hi Robert,
Is there any tutorial/link for rdlc report creation using mdx query/OLAP database?

Dataset

hey guys,

I created a dataset using a design view of the MDX query designer. As you know, in the filter pane of the MDX query, there is check box if you want to parameterized your report. When I checked that option, SQL Server created a dataset specifically for the report parameter. So my question is that I can see this dataset in the data tab of the report designer but not in the Report Datasets list. Do you have any idea why this happened?

waiting to hear soon.

Sincerely,

Amde

Report designer will mark MDX parameter datasets as "auto-generated" in the underlying RDL representation:
<rd:AutoGenerated>true</rd:AutoGenerated>

Reasoning: in general the parameter valid value lists of MDX queries are only relevant for parameter selection.

You can still use those datasets by removing the the rd:AutoGenerated element from the dataset in the RDL file (and have it then show up in the dataset list), or by looking up the name and fields of the autogenerated dataset and hand-writing expressions.

-- Robert

|||

Hey Robert,

I really appreciate your assistance. I got the solution. By the way removing the rd:AutoGenerated element from the rdl file didn't help me to see the dataset. What I did is changing the hidden property of the dataset to false. Now I can see the dataset in the list.

Thank you Robert again.

Sincerely,

Amde

|||

Yes you right - I forgot to mention to remove the <rd:Hidden> element.

-- Robert

|||Hi Robert,
Is there any tutorial/link for rdlc report creation using mdx query/OLAP database?

Sunday, February 26, 2012

Databind for default value in INSERT

Hey guys, how can I databind a default value for my textbox in the <InsertItemTemplate>
I tried an Eval but it obviously didnt't work. The data source has a Selectcommand with ID that I thought I could use in the insertitem, but i guess not.

<asp:FormView ID="FormView2" DataSourceID="SqlDataSource1" runat="server">
<InsertItemTemplate>
Test<br />
<asp:TextBox ID="abc" runat="server" Text='<%# Eval("ID") %>' />
</InsertItemTemplate>
</asp:FormView
How can I do this?
thanks

Hi,

first try Bind instead of Eval in this case. If it's really a default value that you don't want the clients to see it's better to use theInserting eventhandler of the SqlDataSource control.

Grz, Kris.

|||

Actually what I want in this case is to have a default value (like PREFIX in this case) + a databind. I could do it in codebind with .select() and assign find the value from the database and assign "thisIDtextbox" that value"


however, since I've already used the value in the ItemTemplate I thought maybe there is a way to just apply that value in a simple way.

As I said, now I do a sqldatasource.select() procedure and find the value to assign the textbox with. Can I do this in a better way??

<asp:FormViewID="FormView1"runat="server"DataSourceID="SqlDataSource1">

<ItemTemplate>

ThisID:

<asp:LabelID="ReceiverIDLabel"runat="server"Text='<%# Bind("ThisID") %>'></asp:Label><br/></ItemTemplate>

<InsertItemTemplate>

ThisID:

<asp:TextBoxID="ThisIDTextBox"runat="server"Text='PREFIX<%# Bind("ThisID") %>'></asp:TextBox><br/><asp:LinkButtonID="InsertButton"runat="server"CausesValidation="True"CommandName="Insert"Text="Insert"/></InsertItemTemplate>

</asp:FormView>

<asp:SqlDataSourceID="SqlDataSource1"runat="server"ConnectionString="<%$ ConnectionStrings:database %>"SelectCommand="SELECT [ThisID] FROM [db1]"/>

Friday, February 24, 2012

Databases > 100 G

100GB is not considered very large these days. No worry!
Linchi
quote:

>--Original Message--
>Hi Guys,
> We are planning on making a dataware house in our
>company. The size is approximately 200 to 400 G. We have
>to make a recommendation for a database server. I would
>love to say "Sql Server". But frankly I'm not very
>confident at this point. How many people on this board
>have databases larger than 100 G. Is it feasible to do
>this on Sql Server ? I dont want to say Sql Server and
>have to eat my words later. Any facts are welcome from
>live installations > 100 G.
>Thanks,
>Jack
>.
>
I agree with Linchi, 100GB isn't large these days.
Andrew J. Kelly SQL MVP
"Linchi Shea" <linchi_shea@.NOSPAMml.com> wrote in message
news:1520a01c3c40d$c3c2ac40$a601280a@.phx
.gbl...[QUOTE]
> 100GB is not considered very large these days. No worry!
> Linchi
>|||I built a 250 GB database on SQL 7.0 back in 1999 on a 4 CPU box and it ran
very well. Now, I have another database on SQL 2000 that's roughly the same
size on an 8 CPU box. The CPU's are barely doing anything and any problems
we've had have been due to the vendor-supplied software. A 100 GB database
these days is no sweat.
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Andrew J. Kelly" <sqlmvpnoooospam@.shadhawk.com> wrote in message
news:#7WAW7ExDHA.2116@.TK2MSFTNGP11.phx.gbl...
I agree with Linchi, 100GB isn't large these days.
Andrew J. Kelly SQL MVP
"Linchi Shea" <linchi_shea@.NOSPAMml.com> wrote in message
news:1520a01c3c40d$c3c2ac40$a601280a@.phx
.gbl...[QUOTE]
> 100GB is not considered very large these days. No worry!
> Linchi
>

Databases > 100 G

Hi Guys,
We are planning on making a dataware house in our
company. The size is approximately 200 to 400 G. We have
to make a recommendation for a database server. I would
love to say "Sql Server". But frankly I'm not very
confident at this point. How many people on this board
have databases larger than 100 G. Is it feasible to do
this on Sql Server ? I dont want to say Sql Server and
have to eat my words later. Any facts are welcome from
live installations > 100 G.
Thanks,
JackWhilst there is more effort required in the design,architecture and
administration of a 500Gb database as compared to a 500MB database, SQL
Server is more than capable of scaling to these database sizes. You might be
interested in having a look at
Rosetta Genomics 10-Terabyte Human Genome Database
http://www.microsoft.com/sql/techin...000/rosetta.asp
Microsoft SQL Server 2000 Scalability Project
http://www.microsoft.com/sql/techin.../wintercorp.asp
RDBMS Performance Tuning Guide for Data Warehousing
http://www.microsoft.com/technet/tr...part5/c2061.asp
SQL Server Megaservers: Scalability, Availability, Manageability
http://www.microsoft.com/technet/tr...plan/SSMSAM.asp
(you might also get more responses by posting this in .server or
.datawarehouse)
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Jack A" <jacka8@.excite.com> wrote in message
news:0b3101c3c3f5$45e86d90$a501280a@.phx.gbl...
quote:

> Hi Guys,
> We are planning on making a dataware house in our
> company. The size is approximately 200 to 400 G. We have
> to make a recommendation for a database server. I would
> love to say "Sql Server". But frankly I'm not very
> confident at this point. How many people on this board
> have databases larger than 100 G. Is it feasible to do
> this on Sql Server ? I dont want to say Sql Server and
> have to eat my words later. Any facts are welcome from
> live installations > 100 G.
> Thanks,
> Jack

Sunday, February 19, 2012

database with the same name exists

Hi guys,

What is this error

An attempt to attach an auto-named database for file C:\inetpub\wwwroot\Media\App_Data\Library.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.Have u checked the availabily of database in your server. Or any another DB has its mdf file as library.mdf|||Hi,Yes of course other files are ok and working very well|||

SQLExpress creates a directory per user in "c:\Documents and Settings\[user]\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS" to store information. Deleting this directory will fix your problem

Hope this will help you

Friday, February 17, 2012

Database Users

Hi Guys.
I have 2 databases on my sql server, each database has different set of
users.
I want to copy the data between database "a" to database "b".
When i backup "a" and restore into "b" the database users also copy from "a"
and come to "b"
I want to replace these users, but i cannot delete them. because the
database user owns objects in database.
is there a way to rename the database users, or replace them?
Thanks in advance.This is a good page to help your problem
http://support.microsoft.com/default.aspx?scid=kb;en-us;246133
HTH
--
Ray Higdon MCSE, MCDBA, CCNA
--
"MAQ" <pakmaq@.hotmail.com> wrote in message
news:uwyiJVscDHA.1204@.TK2MSFTNGP12.phx.gbl...
> Hi Guys.
> I have 2 databases on my sql server, each database has different set of
> users.
> I want to copy the data between database "a" to database "b".
> When i backup "a" and restore into "b" the database users also copy from
"a"
> and come to "b"
> I want to replace these users, but i cannot delete them. because the
> database user owns objects in database.
> is there a way to rename the database users, or replace them?
> Thanks in advance.
>

Tuesday, February 14, 2012

database update problem

hey guys. My database doesnt update until my application is exited. I need it to update at run time. Could anybody tell me how to fix this problem?

Your application IS using the server in 'run-time'.

Sounds like you may have an issue with how the application is holding data remotely, and then flushing its data changes to the server upon exit or close. That is a application design issue and not a SQL Server issue.

Perhaps I'm not understanding your plight. Care to go into more detail?

|||it updates when I run it from visual, just not the published version

Database Unit Testing

Hi guys,
Is there any tools out there to automate database unit testing?
I need to find a tool that would enable us to automate database unit testing
in our nightly build.
tia,
EricYou might look at http://sourceforge.net/projects/tsqlunit
I found it last week; NOTE I have not yet had the time to see if it is
worth doing.
Tim S
"Aiwa" <Aiwa@.discussions.microsoft.com> wrote in message news:<80028EEA-FD33-4074-A7BE-F3372D483E84@.microsoft.com>...
> Hi guys,
> Is there any tools out there to automate database unit testing?
> I need to find a tool that would enable us to automate database unit testing
> in our nightly build.
> tia,
> Eric

Database Unit Testing

Hi guys,
Is there any tools out there to automate database unit testing?
I need to find a tool that would enable us to automate database unit testing
in our nightly build.
tia,
Eric
You might look at http://sourceforge.net/projects/tsqlunit
I found it last week; NOTE I have not yet had the time to see if it is
worth doing.
Tim S
"Aiwa" <Aiwa@.discussions.microsoft.com> wrote in message news:<80028EEA-FD33-4074-A7BE-F3372D483E84@.microsoft.com>...
> Hi guys,
> Is there any tools out there to automate database unit testing?
> I need to find a tool that would enable us to automate database unit testing
> in our nightly build.
> tia,
> Eric

Database Unit Testing

Hi guys,
Is there any tools out there to automate database unit testing?
I need to find a tool that would enable us to automate database unit testing
in our nightly build.
tia,
EricYou might look at http://sourceforge.net/projects/tsqlunit
I found it last week; NOTE I have not yet had the time to see if it is
worth doing.
Tim S
"Aiwa" <Aiwa@.discussions.microsoft.com> wrote in message news:<80028EEA-FD33-4074-A7BE-F3372
D483E84@.microsoft.com>...
> Hi guys,
> Is there any tools out there to automate database unit testing?
> I need to find a tool that would enable us to automate database unit testi
ng
> in our nightly build.
> tia,
> Eric