Showing posts with label correctly. Show all posts
Showing posts with label correctly. Show all posts

Wednesday, March 28, 2012

One DataRegion(Table) Multiple DataSets

I have a complexed report
It makes use of two queries and 2 tables
I need to use a group in order to display the information correctly,
If I had one query it would have worked perfectly, But the data I am
retrieving is so complexed that I need to make use of two queries other wise
I get duplicate data
Table 1 contains section1, and 2 of the displayed info
Table 2 contains the 3rd section
it looks like this;
Page 1
header
Section1
Section 2
Section 3
Footer
Page 2
header
Section1
Section 2
Section 3
Footer
So in order to accomplish this I take two tables link them to one dataset.
Add a group, But this results in the following. I need page breaks so I set
the page break option in the group properties
Page 1
header
section 1
section2
Footer
Page 2
section1
section2
Page 3
Section 3
Page 4 Section 3
I then put the 2 tables in a list box, and set the grouping on the list, And
This works 100 %. It groups all the data brilliantly. The problem is I cant
use one query, I need to use two!
SO Is their a work around or some way to link 2 datasets to one list
control.By adding the full path or something. The only way I can currently
reference more than one dataset per table is by using aggeragate funtions.
But =First(Fields!SIZE.Value, "DataSet2") will only return the top 1 result
so that doesnt work I tried (Fields!SIZE.Value, "DataSet2") but that returns
an errorData regions, in SQL Server 2000 Reporting Services, can only be bound to a
single data set with once exception: All secondary data references must be
contained in an aggregate function with the dataset specified. For example,
First(=Fields!<SomeField>.Value), "<SomeDataSet>"), is allowed. To achieve
the effect you want will have to be done in the query. Some of the tools
available to you are joins, unions, openrowset, or linked servers.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Griffen" <Griffen@.discussions.microsoft.com> wrote in message
news:B7A2C3C0-4522-466A-B5D2-08ECCD3471C1@.microsoft.com...
> I have a complexed report
> It makes use of two queries and 2 tables
> I need to use a group in order to display the information correctly,
> If I had one query it would have worked perfectly, But the data I am
> retrieving is so complexed that I need to make use of two queries other
wise
> I get duplicate data
> Table 1 contains section1, and 2 of the displayed info
> Table 2 contains the 3rd section
> it looks like this;
> Page 1
> header
> Section1
> Section 2
> Section 3
> Footer
>
> Page 2
> header
> Section1
> Section 2
> Section 3
> Footer
> So in order to accomplish this I take two tables link them to one dataset.
> Add a group, But this results in the following. I need page breaks so I
set
> the page break option in the group properties
>
> Page 1
> header
> section 1
> section2
> Footer
> Page 2
> section1
> section2
> Page 3
> Section 3
> Page 4 Section 3
> I then put the 2 tables in a list box, and set the grouping on the list,
And
> This works 100 %. It groups all the data brilliantly. The problem is I
cant
> use one query, I need to use two!
> SO Is their a work around or some way to link 2 datasets to one list
> control.By adding the full path or something. The only way I can currently
> reference more than one dataset per table is by using aggeragate funtions.
> But =First(Fields!SIZE.Value, "DataSet2") will only return the top 1
result
> so that doesnt work I tried (Fields!SIZE.Value, "DataSet2") but that
returns
> an errorsql

Monday, March 26, 2012

on nt4

I know this sounds oldish but the fact is I have Sql Server 2000 installed
on an NT4 machine. Everything works correctly exept Sql Server stops by
itself after a certain amount of time, irrigularly. There is nothing in the
log of the server of the machine.
Is there another tool that I could use to find out why this appends.
thanks
Fernand
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.733 / Virus Database: 487 - Release Date: 2004-08-02
Hi,
Could you please monitor your resource utlization (Memory in particular)
using performance monitor. Check the usage of virtual memory as well.
Look into the Event viewer as well as SQL server error logs for any messages
or errors.
As well as check you have the latest service pack applied for SQL 2000.
Latest is SP3a
select serverproperty('productlevel')
Thanks
Hari
MCDBA
"Fernand St-Georges" <fernand.st-georges@.videotron.ca> wrote in message
news:nWmQc.5869$DP2.32555@.wagner.videotron.net...
> I know this sounds oldish but the fact is I have Sql Server 2000 installed
> on an NT4 machine. Everything works correctly exept Sql Server stops by
> itself after a certain amount of time, irrigularly. There is nothing in
the
> log of the server of the machine.
> Is there another tool that I could use to find out why this appends.
> thanks
> Fernand
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.733 / Virus Database: 487 - Release Date: 2004-08-02
>
|||I am not familiar with your sayings. What do you mean by Event viewer. On
XP it is easy to figure out, but on Nt4 the Log that I found did not give
any indication, not even the fact that I restarted Sql Server.
I will also install Sp3.
thanks
Fernand
"Hari Prasad" <hari_prasad_k@.hotmail.com> a crit dans le message de news:
emOBT4seEHA.2440@.tk2msftngp13.phx.gbl...
> Hi,
> Could you please monitor your resource utlization (Memory in particular)
> using performance monitor. Check the usage of virtual memory as well.
> Look into the Event viewer as well as SQL server error logs for any
messages[vbcol=seagreen]
> or errors.
> As well as check you have the latest service pack applied for SQL 2000.
> Latest is SP3a
> select serverproperty('productlevel')
>
> Thanks
> Hari
> MCDBA
>
> "Fernand St-Georges" <fernand.st-georges@.videotron.ca> wrote in message
> news:nWmQc.5869$DP2.32555@.wagner.videotron.net...
installed
> the
>
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.733 / Virus Database: 487 - Release Date: 2004-08-02
|||Hi,
Event viewer -- Which stores all the System , Application and Security logs.
Go to Start -- Programs -- Administrative tools -- Event viewer-- Click the
Log menu to see the other logs.
Thanks
Hari
MCDBA
"Fernand St-Georges" <fernand.st-georges@.videotron.ca> wrote in message
news:olnQc.6942$DP2.35920@.wagner.videotron.net...
> I am not familiar with your sayings. What do you mean by Event viewer.
On[vbcol=seagreen]
> XP it is easy to figure out, but on Nt4 the Log that I found did not give
> any indication, not even the fact that I restarted Sql Server.
> I will also install Sp3.
> thanks
> Fernand
>
> "Hari Prasad" <hari_prasad_k@.hotmail.com> a crit dans le message de news:
> emOBT4seEHA.2440@.tk2msftngp13.phx.gbl...
> messages
> installed
by[vbcol=seagreen]
in
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.733 / Virus Database: 487 - Release Date: 2004-08-02
>

on nt4

I know this sounds oldish but the fact is I have Sql Server 2000 installed
on an NT4 machine. Everything works correctly exept Sql Server stops by
itself after a certain amount of time, irrigularly. There is nothing in the
log of the server of the machine.
Is there another tool that I could use to find out why this appends.
thanks
Fernand
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.733 / Virus Database: 487 - Release Date: 2004-08-02Hi,
Could you please monitor your resource utlization (Memory in particular)
using performance monitor. Check the usage of virtual memory as well.
Look into the Event viewer as well as SQL server error logs for any messages
or errors.
As well as check you have the latest service pack applied for SQL 2000.
Latest is SP3a
select serverproperty('productlevel')
Thanks
Hari
MCDBA
"Fernand St-Georges" <fernand.st-georges@.videotron.ca> wrote in message
news:nWmQc.5869$DP2.32555@.wagner.videotron.net...
> I know this sounds oldish but the fact is I have Sql Server 2000 installed
> on an NT4 machine. Everything works correctly exept Sql Server stops by
> itself after a certain amount of time, irrigularly. There is nothing in
the
> log of the server of the machine.
> Is there another tool that I could use to find out why this appends.
> thanks
> Fernand
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.733 / Virus Database: 487 - Release Date: 2004-08-02
>|||I am not familiar with your sayings. What do you mean by Event viewer. On
XP it is easy to figure out, but on Nt4 the Log that I found did not give
any indication, not even the fact that I restarted Sql Server.
I will also install Sp3.
thanks
Fernand
"Hari Prasad" <hari_prasad_k@.hotmail.com> a crit dans le message de news:
emOBT4seEHA.2440@.tk2msftngp13.phx.gbl...
> Hi,
> Could you please monitor your resource utlization (Memory in particular)
> using performance monitor. Check the usage of virtual memory as well.
> Look into the Event viewer as well as SQL server error logs for any
messages
> or errors.
> As well as check you have the latest service pack applied for SQL 2000.
> Latest is SP3a
> select serverproperty('productlevel')
>
> Thanks
> Hari
> MCDBA
>
> "Fernand St-Georges" <fernand.st-georges@.videotron.ca> wrote in message
> news:nWmQc.5869$DP2.32555@.wagner.videotron.net...
installed[vbcol=seagreen]
> the
>
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.733 / Virus Database: 487 - Release Date: 2004-08-02|||Hi,
Event viewer -- Which stores all the System , Application and Security logs.
Go to Start -- Programs -- Administrative tools -- Event viewer-- Click the
Log menu to see the other logs.
Thanks
Hari
MCDBA
"Fernand St-Georges" <fernand.st-georges@.videotron.ca> wrote in message
news:olnQc.6942$DP2.35920@.wagner.videotron.net...
> I am not familiar with your sayings. What do you mean by Event viewer.
On
> XP it is easy to figure out, but on Nt4 the Log that I found did not give
> any indication, not even the fact that I restarted Sql Server.
> I will also install Sp3.
> thanks
> Fernand
>
> "Hari Prasad" <hari_prasad_k@.hotmail.com> a crit dans le message de news:
> emOBT4seEHA.2440@.tk2msftngp13.phx.gbl...
> messages
> installed
by[vbcol=seagreen]
in[vbcol=seagreen]
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.733 / Virus Database: 487 - Release Date: 2004-08-02
>

on nt4

I know this sounds oldish but the fact is I have Sql Server 2000 installed
on an NT4 machine. Everything works correctly exept Sql Server stops by
itself after a certain amount of time, irrigularly. There is nothing in the
log of the server of the machine.
Is there another tool that I could use to find out why this appends.
thanks
Fernand
--
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.733 / Virus Database: 487 - Release Date: 2004-08-02Hi,
Could you please monitor your resource utlization (Memory in particular)
using performance monitor. Check the usage of virtual memory as well.
Look into the Event viewer as well as SQL server error logs for any messages
or errors.
As well as check you have the latest service pack applied for SQL 2000.
Latest is SP3a
select serverproperty('productlevel')
Thanks
Hari
MCDBA
"Fernand St-Georges" <fernand.st-georges@.videotron.ca> wrote in message
news:nWmQc.5869$DP2.32555@.wagner.videotron.net...
> I know this sounds oldish but the fact is I have Sql Server 2000 installed
> on an NT4 machine. Everything works correctly exept Sql Server stops by
> itself after a certain amount of time, irrigularly. There is nothing in
the
> log of the server of the machine.
> Is there another tool that I could use to find out why this appends.
> thanks
> Fernand
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.733 / Virus Database: 487 - Release Date: 2004-08-02
>|||I am not familiar with your sayings. What do you mean by Event viewer. On
XP it is easy to figure out, but on Nt4 the Log that I found did not give
any indication, not even the fact that I restarted Sql Server.
I will also install Sp3.
thanks
Fernand
"Hari Prasad" <hari_prasad_k@.hotmail.com> a écrit dans le message de news:
emOBT4seEHA.2440@.tk2msftngp13.phx.gbl...
> Hi,
> Could you please monitor your resource utlization (Memory in particular)
> using performance monitor. Check the usage of virtual memory as well.
> Look into the Event viewer as well as SQL server error logs for any
messages
> or errors.
> As well as check you have the latest service pack applied for SQL 2000.
> Latest is SP3a
> select serverproperty('productlevel')
>
> Thanks
> Hari
> MCDBA
>
> "Fernand St-Georges" <fernand.st-georges@.videotron.ca> wrote in message
> news:nWmQc.5869$DP2.32555@.wagner.videotron.net...
> > I know this sounds oldish but the fact is I have Sql Server 2000
installed
> > on an NT4 machine. Everything works correctly exept Sql Server stops by
> > itself after a certain amount of time, irrigularly. There is nothing in
> the
> > log of the server of the machine.
> > Is there another tool that I could use to find out why this appends.
> >
> > thanks
> >
> > Fernand
> >
> >
> >
> > --
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.733 / Virus Database: 487 - Release Date: 2004-08-02
> >
> >
>
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.733 / Virus Database: 487 - Release Date: 2004-08-02|||Hi,
Event viewer -- Which stores all the System , Application and Security logs.
Go to Start -- Programs -- Administrative tools -- Event viewer-- Click the
Log menu to see the other logs.
Thanks
Hari
MCDBA
"Fernand St-Georges" <fernand.st-georges@.videotron.ca> wrote in message
news:olnQc.6942$DP2.35920@.wagner.videotron.net...
> I am not familiar with your sayings. What do you mean by Event viewer.
On
> XP it is easy to figure out, but on Nt4 the Log that I found did not give
> any indication, not even the fact that I restarted Sql Server.
> I will also install Sp3.
> thanks
> Fernand
>
> "Hari Prasad" <hari_prasad_k@.hotmail.com> a écrit dans le message de news:
> emOBT4seEHA.2440@.tk2msftngp13.phx.gbl...
> > Hi,
> >
> > Could you please monitor your resource utlization (Memory in particular)
> > using performance monitor. Check the usage of virtual memory as well.
> > Look into the Event viewer as well as SQL server error logs for any
> messages
> > or errors.
> >
> > As well as check you have the latest service pack applied for SQL 2000.
> > Latest is SP3a
> >
> > select serverproperty('productlevel')
> >
> >
> > Thanks
> > Hari
> > MCDBA
> >
> >
> > "Fernand St-Georges" <fernand.st-georges@.videotron.ca> wrote in message
> > news:nWmQc.5869$DP2.32555@.wagner.videotron.net...
> > > I know this sounds oldish but the fact is I have Sql Server 2000
> installed
> > > on an NT4 machine. Everything works correctly exept Sql Server stops
by
> > > itself after a certain amount of time, irrigularly. There is nothing
in
> > the
> > > log of the server of the machine.
> > > Is there another tool that I could use to find out why this appends.
> > >
> > > thanks
> > >
> > > Fernand
> > >
> > >
> > >
> > > --
> > > Outgoing mail is certified Virus Free.
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.733 / Virus Database: 487 - Release Date: 2004-08-02
> > >
> > >
> >
> >
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.733 / Virus Database: 487 - Release Date: 2004-08-02
>

Monday, March 12, 2012

OLE DB: How to set the property DBPROP_SSCE_TRANSACTION_COMMIT_MODE correctly?

Hello,

because of the fact that the database sdf-file is stored on a cf-card, i want that all commit transactions will be flushed to the file immediately.
So i want to open the database with the above property. But i don't know the type and value i have to place into the variant. The following code fragment gave me the error "DB_S_ERRORSOCCURRED when i try to set the property with IDBInitialize::SetProperties() :

//Initialize property DBPROP_SSCE_TRANSACTION_COMMIT_MODE
dbprop_ssce_session[0].dwPropertyID = DBPROP_SSCE_TRANSACTION_COMMIT_MODE;
dbprop_ssce_session[0].dwOptions = DBPROPOPTIONS_REQUIRED;
dbprop_ssce_session[0].vValue.vt = VT_I4;
dbprop_ssce_session[0].vValue.lVal = DBPROPVAL_SSCE_TCM_FLUSH;

//Initialize property set DBPROPSET_SSCE_SESSION
dbpropset[1].guidPropertySet = DBPROPSET_SSCE_SESSION;
dbpropset[1].rgProperties = dbprop_ssce_session;
dbpropset[1].cProperties = 1;
//(there is another property for the path not shown here)

I would appreciate it when someone out there knows the answer and could tell me.

Kind regards,
Andre

Your code looks ok. I use the ATL OLE DB Consumer Templates for this and they also set the colid member to DB_NULLID. This is the only thing I see missing from your code.

Other than this, I would also look at the OLE DB error parameters to get more details.

|||

Every thing is okay except that you are setting the property on IDBInitialize. This is a session related property and so should be set using ISessionProperties.

If the question is answered, please mark it as answered.

Thanks

Raja

|||Thanks Raja,

that was exactly the crux of the matter!

Kind regards,
Andre

OLE DB: How to set the property DBPROP_SSCE_TRANSACTION_COMMIT_MODE correctly?

Hello,

because of the fact that the database sdf-file is stored on a cf-card, i want that all commit transactions will be flushed to the file immediately.
So i want to open the database with the above property. But i don't know the type and value i have to place into the variant. The following code fragment gave me the error "DB_S_ERRORSOCCURRED when i try to set the property with IDBInitialize::SetProperties() :

//Initialize property DBPROP_SSCE_TRANSACTION_COMMIT_MODE
dbprop_ssce_session[0].dwPropertyID = DBPROP_SSCE_TRANSACTION_COMMIT_MODE;
dbprop_ssce_session[0].dwOptions = DBPROPOPTIONS_REQUIRED;
dbprop_ssce_session[0].vValue.vt = VT_I4;
dbprop_ssce_session[0].vValue.lVal = DBPROPVAL_SSCE_TCM_FLUSH;

//Initialize property set DBPROPSET_SSCE_SESSION
dbpropset[1].guidPropertySet = DBPROPSET_SSCE_SESSION;
dbpropset[1].rgProperties = dbprop_ssce_session;
dbpropset[1].cProperties = 1;
//(there is another property for the path not shown here)

I would appreciate it when someone out there knows the answer and could tell me.

Kind regards,
Andre

Your code looks ok. I use the ATL OLE DB Consumer Templates for this and they also set the colid member to DB_NULLID. This is the only thing I see missing from your code.

Other than this, I would also look at the OLE DB error parameters to get more details.

|||

Every thing is okay except that you are setting the property on IDBInitialize. This is a session related property and so should be set using ISessionProperties.

If the question is answered, please mark it as answered.

Thanks

Raja

|||Thanks Raja,

that was exactly the crux of the matter!

Kind regards,
Andre