Showing posts with label together. Show all posts
Showing posts with label together. Show all posts

Wednesday, March 7, 2012

HELP! - Problem with hints...

Hello everyone,
I'm having this problem, I'm trying to run a query that consists of six
tables and one view (all joined together)
When I run it without anything on the where (or just one criteria in the
where clause) works just fine, but if I run it with two criteria in the
where clause I get the following message:
<<< [Microsoft][ODBC SQL Server Driver][SQL Server]Could not insert a row
larger than the page size into a hash table. Resubmit the query with the
ROBUST PLAN hint. >>
And when I do so -adding the ROBUST PLAN option-, I get the following
message:
<<< 'Query hints' cannot be used in this query type. >>
Any idea what is going on?!? please let me know!!!
TIA,
sb-rEveryone,
I forgot to put this...
I'm using SQL Server 2000 on Win2003 Server, SP 1
Thanks again...
"segis bata" <segisbata@.hotmail.com> wrote in message
news:exo1vo0qGHA.4192@.TK2MSFTNGP04.phx.gbl...
> Hello everyone,
> I'm having this problem, I'm trying to run a query that consists of six
> tables and one view (all joined together)
> When I run it without anything on the where (or just one criteria in the
> where clause) works just fine, but if I run it with two criteria in the
> where clause I get the following message:
> <<< [Microsoft][ODBC SQL Server Driver][SQL Server]Could not insert a row
> larger than the page size into a hash table. Resubmit the query with the
> ROBUST PLAN hint. >>
> And when I do so -adding the ROBUST PLAN option-, I get the following
> message:
> <<< 'Query hints' cannot be used in this query type. >>
> Any idea what is going on?!? please let me know!!!
> TIA,
> sb-r
>|||segis bata (segisbata@.hotmail.com) writes:
> I'm having this problem, I'm trying to run a query that consists of six
> tables and one view (all joined together)
> When I run it without anything on the where (or just one criteria in the
> where clause) works just fine, but if I run it with two criteria in the
> where clause I get the following message:
><<< [Microsoft][ODBC SQL Server Driver][SQL Server]Could not insert a row
> larger than the page size into a hash table. Resubmit the query with the
> ROBUST PLAN hint. >>
> And when I do so -adding the ROBUST PLAN option-, I get the following
> message:
><<< 'Query hints' cannot be used in this query type. >>
> Any idea what is going on?!? please let me know!!!
Sounds like you are in dire straits. But at least you could post the
query you are having problem with.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx|||What happen if you try the query without the view in it? with and without the
robust plan in the query.
"segis bata" wrote:
> Hello everyone,
> I'm having this problem, I'm trying to run a query that consists of six
> tables and one view (all joined together)
> When I run it without anything on the where (or just one criteria in the
> where clause) works just fine, but if I run it with two criteria in the
> where clause I get the following message:
> <<< [Microsoft][ODBC SQL Server Driver][SQL Server]Could not insert a row
> larger than the page size into a hash table. Resubmit the query with the
> ROBUST PLAN hint. >>
> And when I do so -adding the ROBUST PLAN option-, I get the following
> message:
> <<< 'Query hints' cannot be used in this query type. >>
> Any idea what is going on?!? please let me know!!!
> TIA,
> sb-r
>
>

HELP! - Problem with hints...

Hello everyone,
I'm having this problem, I'm trying to run a query that consists of six
tables and one view (all joined together)
When I run it without anything on the where (or just one criteria in the
where clause) works just fine, but if I run it with two criteria in the
where clause I get the following message:
<<< [Microsoft][ODBC SQL Server Driver][SQL Server]Could not ins
ert a row
larger than the page size into a hash table. Resubmit the query with the
ROBUST PLAN hint. >>>
And when I do so -adding the ROBUST PLAN option-, I get the following
message:
<<< 'Query hints' cannot be used in this query type. >>>
Any idea what is going on?!? please let me know!!!
TIA,
sb-rEveryone,
I forgot to put this...
I'm using SQL Server 2000 on Win2003 Server, SP 1
Thanks again...
"segis bata" <segisbata@.hotmail.com> wrote in message
news:exo1vo0qGHA.4192@.TK2MSFTNGP04.phx.gbl...
> Hello everyone,
> I'm having this problem, I'm trying to run a query that consists of six
> tables and one view (all joined together)
> When I run it without anything on the where (or just one criteria in the
> where clause) works just fine, but if I run it with two criteria in the
> where clause I get the following message:
> <<< [Microsoft][ODBC SQL Server Driver][SQL Server]Could not i
nsert a row
> larger than the page size into a hash table. Resubmit the query with the
> ROBUST PLAN hint. >>>
> And when I do so -adding the ROBUST PLAN option-, I get the following
> message:
> <<< 'Query hints' cannot be used in this query type. >>>
> Any idea what is going on?!? please let me know!!!
> TIA,
> sb-r
>|||segis bata (segisbata@.hotmail.com) writes:
> I'm having this problem, I'm trying to run a query that consists of six
> tables and one view (all joined together)
> When I run it without anything on the where (or just one criteria in the
> where clause) works just fine, but if I run it with two criteria in the
> where clause I get the following message:
><<< [Microsoft][ODBC SQL Server Driver][SQL Server]Could not in
sert a row
> larger than the page size into a hash table. Resubmit the query with the
> ROBUST PLAN hint. >>>
> And when I do so -adding the ROBUST PLAN option-, I get the following
> message:
><<< 'Query hints' cannot be used in this query type. >>>
> Any idea what is going on?!? please let me know!!!
Sounds like you are in dire straits. But at least you could post the
query you are having problem with.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||What happen if you try the query without the view in it? with and without th
e
robust plan in the query.
"segis bata" wrote:

> Hello everyone,
> I'm having this problem, I'm trying to run a query that consists of six
> tables and one view (all joined together)
> When I run it without anything on the where (or just one criteria in the
> where clause) works just fine, but if I run it with two criteria in the
> where clause I get the following message:
> <<< [Microsoft][ODBC SQL Server Driver][SQL Server]Could not i
nsert a row
> larger than the page size into a hash table. Resubmit the query with the
> ROBUST PLAN hint. >>>
> And when I do so -adding the ROBUST PLAN option-, I get the following
> message:
> <<< 'Query hints' cannot be used in this query type. >>>
> Any idea what is going on?!? please let me know!!!
> TIA,
> sb-r
>
>

Sunday, February 19, 2012

Help with UPDATE with SqlDataSource and a Repeater

Hi,

I have a repeater which i need to build editing capabilities into in a similar way as the GridView, just a little unsure how to tie it together. Ideally i would like to use a GridView as this would do all of the work for me however it looks like I need to go with the repeater due to the nested nature of the data I am working with.

What is the best way to go about updating the data source from within a repeater? I have already built the edit interface with some MultiViews in the Repeater control and handling the ItemCommand event, just not sure how to actually update the data source.

Can I still use the SqlDataSource wizard to generate all of the SQL for me? If so, within the ItemCommand event handler I have the data i want to update back to the database by using the FindControl method and retrieving the Text, but how do i get this data into the SqlDataSource object and update the database?

Are there any samples available which show how to update a datasource using a repeater?

Your help is much appreciated

trenyboy

Have you thought about using a DataList, this is halfway between the GridView and the Repeater, but it's certainly easier to work with :-)

Have a look at thissample for an example of DataList binding, and thisone for an example of updating.

|||

No, I hadn't up until now! I was using the repeater because I have nested data which I needed to appear as if it were part of the same table, hence I need to render the html myself, but I see the DataList will also allow for this!

Does the DataList have support for Edit/Update in a similar way as the GridView does with using the SqlDataSource wizard and no custom code (ASP.NET 2.0)? If not, what would be the advantage for using the DataList over the Repeater?

Thanks

|||I'm not sure what you mean by "nested data". If you could explain that a little better I'm sure someone could come up with a good solution for you. Is the nested data from the SQL Server, and you want to add some more columns on to it, or is the nested data something being generated by the ASP.NET application like in an array/list?|||By nested data I am referring to parent/child relationships. Ihave summary (parent) rows which contain one or more detail (child)rows. All rows need to look as though they are part of the sametable, however, the parent rows provide an option to show or hide allof its related child rows.

What I have done to get around this is to use one repeater for theparent data, and another repeater for the child data, this way I ammanually rendering the html as a single table, but I can show/hide thischild repeater via its visible property.

It is from SQL Server, and all i want to be able to do is provide anediting functionality to allow the user to update the underlyingdatasource from the interface.

Does this make more sense?|||

Yes it does. I've never done that myself, but perhaps someone else here has.

If it were me, I would use a query to return all the data I wanted in the order I wanted, then use the gridview, and write my own javascript to hide/show the child rows.

|||

trenyboy wrote:

Does the DataList have support for Edit/Update in a similar way as the GridView does with using the SqlDataSource wizard and no custom code (ASP.NET 2.0)? If not, what would be the advantage for using the DataList over the Repeater?

No it doesn't. What I've always done in the past is implement my DataList_UpdateCommand and simply call the update on the DataAdapter that is Filling the DataSet that backs up the DataList. Then you can use QueryBuilder to generate the Update for you.

In fact I'm starting to think I might be able to use an ObjectDataSource here, I may have to experiment a little :-)