Showing posts with label missing. Show all posts
Showing posts with label missing. Show all posts

Monday, March 19, 2012

MissingMethodException

I am getting a missing method exception when I call any SqlCE method on my Windows Mobile 5, Pocket PC.

This works fine using the emulator through Visual Studio 2005, but not on the actual device. Programs run fine on the device when they are not using SqlCe.

My question is what do I need to sort this problem, as I am guessing I am missing a CAB file.

I have manually installed:
sql.dev.ENU.wce5.armv4i.CAB
sql.wce5.armv4i.CAB
sqlce30.dev.ENU.wce5.armv4i.CAB
sqlce30.wce5.arm4vi.CAB
sqlce30.repl.wce5.armv4i.CAB

Query Analyser is working on the device, I have created a database, with one table and a row of data with no problem.

Any suggestions would be much appreciated.

Thanks.
(I think) i have a similar problem...i use sqlce to access a database and it works fine, but when i change the query i some simple math functions (+,*,-), it works using the emulator, but not in the device...

thank you.

Missing: Have you seen me? Reportviewer toolbar button

Hi all,

I've implemented some reports with the asp.net2 reportviewer component. But it seems that the Print button has gone missing... The ShowPrintButton property is set to true on the control, but it's nowhere to be found on the component when rendered... and it's not shown in design mode too...

How do I enable it, I've put all the dll's I would need in my bin folder of my project, but doesn't the print feature need the active x component to work too? Where would I find that control, and how do I set it up?

Thanks

See these links, hope they're useful:
http://forums.asp.net/thread/1058375.aspx
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=22277&SiteID=1

Missing zeros

I'm trying to report on the number of tickets created by day for 21 days, but
when there are no tickets logged on a day, i need a 0. I have been trying to
get my query to return 0's for every day of the 21 days, but that hasn't
worked. I have tried to get the Matrix to show 21 days, but that hasn't
worked either. To add complexity, i need to graph this matrix, so i cannot
simply use a sub-report. (otherwise it would be done.)
A subset of the results from the query are as follows:
1/5/2006 4
1/6/2006 5
1/8/2006 3
1/20/2006 1
What i need is:
1/4/2006 0
1/5/2006 4
1/6/2006 5
1/7/2006 0
1/8/2006 3
1/9/2006 0
1/20/2006 1
Back in my access days, i just ran the maketable query, then used VB to
'pad' in as many zero values as needed, and then ran the report off the table.
Any suggestions?Where do you get the data from? Where does the numbers come from - are you
summing in your query or is that done automagically somewhere in the
database? And where are the dates and the numbers connected?
My guess is that you have to make your SQL query return all 21 lines. If you
use an outer join for dates and numbers, and do a Case test for the numbers,
you should get all your rows.
Kaisa M. Lindahl
"Brent Maloney" <BrentMaloney@.discussions.microsoft.com> wrote in message
news:7C5F489A-68D9-4681-88B9-324B77104AC7@.microsoft.com...
> I'm trying to report on the number of tickets created by day for 21 days,
> but
> when there are no tickets logged on a day, i need a 0. I have been trying
> to
> get my query to return 0's for every day of the 21 days, but that hasn't
> worked. I have tried to get the Matrix to show 21 days, but that hasn't
> worked either. To add complexity, i need to graph this matrix, so i
> cannot
> simply use a sub-report. (otherwise it would be done.)
> A subset of the results from the query are as follows:
> 1/5/2006 4
> 1/6/2006 5
> 1/8/2006 3
> 1/20/2006 1
> What i need is:
> 1/4/2006 0
> 1/5/2006 4
> 1/6/2006 5
> 1/7/2006 0
> 1/8/2006 3
> 1/9/2006 0
> 1/20/2006 1
> Back in my access days, i just ran the maketable query, then used VB to
> 'pad' in as many zero values as needed, and then ran the report off the
> table.
> Any suggestions?|||If there are no rows for days with no tickets and you are using a query like..
select date, sum(ticketsales) from table group by date
you will get no rows for dates with no tickets... One way to do this would
be to create another table with one for each date /... Then your query could
be
select dt.date, sum(isnull(ticketsales,0)) from table inner join dttable dt
on dt.date = table.dt group by dt.date
You will get a row for each date...
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"Kaisa M. Lindahl" wrote:
> Where do you get the data from? Where does the numbers come from - are you
> summing in your query or is that done automagically somewhere in the
> database? And where are the dates and the numbers connected?
> My guess is that you have to make your SQL query return all 21 lines. If you
> use an outer join for dates and numbers, and do a Case test for the numbers,
> you should get all your rows.
> Kaisa M. Lindahl
> "Brent Maloney" <BrentMaloney@.discussions.microsoft.com> wrote in message
> news:7C5F489A-68D9-4681-88B9-324B77104AC7@.microsoft.com...
> > I'm trying to report on the number of tickets created by day for 21 days,
> > but
> > when there are no tickets logged on a day, i need a 0. I have been trying
> > to
> > get my query to return 0's for every day of the 21 days, but that hasn't
> > worked. I have tried to get the Matrix to show 21 days, but that hasn't
> > worked either. To add complexity, i need to graph this matrix, so i
> > cannot
> > simply use a sub-report. (otherwise it would be done.)
> >
> > A subset of the results from the query are as follows:
> > 1/5/2006 4
> > 1/6/2006 5
> > 1/8/2006 3
> > 1/20/2006 1
> >
> > What i need is:
> > 1/4/2006 0
> > 1/5/2006 4
> > 1/6/2006 5
> > 1/7/2006 0
> > 1/8/2006 3
> > 1/9/2006 0
> > 1/20/2006 1
> >
> > Back in my access days, i just ran the maketable query, then used VB to
> > 'pad' in as many zero values as needed, and then ran the report off the
> > table.
> >
> > Any suggestions?
>
>

Missing xp_sqlagent_notify

I'm trying to have an alert fire when it receives an error via the RAISERROR
call. I have it working in SQL 2000, but can't get it to work for SQL 2005.
When I look at the history of the alert, it says that it has not been raised
yet.
When I look at the log from SQLServerAgent, I see that it is missing the
stored procedure xp_sqlagent_notify. Where would I find this missing
procedure? I see that I have an sp_sqlagent_notify -- should I just rename o
r
copy it?
SteveIt sounds like it may not be logging if the history of the
alert indicates it hasn't been raised. Did you create the
message using @.with_log = true or are you raising the error
using with log?
Try testing by doing a raiserror with log. Or you can use
sp_altermessage YourMessageNumber, 'with log', 'true'
to log the message.
-Sue
On Fri, 19 May 2006 11:04:01 -0700, SteveIrwin
<SteveIrwin@.discussions.microsoft.com> wrote:

>I'm trying to have an alert fire when it receives an error via the RAISERRO
R
>call. I have it working in SQL 2000, but can't get it to work for SQL 2005.
>When I look at the history of the alert, it says that it has not been raise
d
>yet.
>When I look at the log from SQLServerAgent, I see that it is missing the
>stored procedure xp_sqlagent_notify. Where would I find this missing
>procedure? I see that I have an sp_sqlagent_notify -- should I just rename
or
>copy it?
>Steve|||That worked, Sue. Thanks!
Steve
"Sue Hoegemeier" wrote:

> It sounds like it may not be logging if the history of the
> alert indicates it hasn't been raised. Did you create the
> message using @.with_log = true or are you raising the error
> using with log?
> Try testing by doing a raiserror with log. Or you can use
> sp_altermessage YourMessageNumber, 'with log', 'true'
> to log the message.
> -Sue
> On Fri, 19 May 2006 11:04:01 -0700, SteveIrwin
> <SteveIrwin@.discussions.microsoft.com> wrote:
>
>

Missing xp_sqlagent_notify

I'm trying to have an alert fire when it receives an error via the RAISERROR
call. I have it working in SQL 2000, but can't get it to work for SQL 2005.
When I look at the history of the alert, it says that it has not been raised
yet.
When I look at the log from SQLServerAgent, I see that it is missing the
stored procedure xp_sqlagent_notify. Where would I find this missing
procedure? I see that I have an sp_sqlagent_notify -- should I just rename or
copy it?
SteveIt sounds like it may not be logging if the history of the
alert indicates it hasn't been raised. Did you create the
message using @.with_log = true or are you raising the error
using with log?
Try testing by doing a raiserror with log. Or you can use
sp_altermessage YourMessageNumber, 'with log', 'true'
to log the message.
-Sue
On Fri, 19 May 2006 11:04:01 -0700, SteveIrwin
<SteveIrwin@.discussions.microsoft.com> wrote:
>I'm trying to have an alert fire when it receives an error via the RAISERROR
>call. I have it working in SQL 2000, but can't get it to work for SQL 2005.
>When I look at the history of the alert, it says that it has not been raised
>yet.
>When I look at the log from SQLServerAgent, I see that it is missing the
>stored procedure xp_sqlagent_notify. Where would I find this missing
>procedure? I see that I have an sp_sqlagent_notify -- should I just rename or
>copy it?
>Steve|||That worked, Sue. Thanks!
Steve
"Sue Hoegemeier" wrote:
> It sounds like it may not be logging if the history of the
> alert indicates it hasn't been raised. Did you create the
> message using @.with_log = true or are you raising the error
> using with log?
> Try testing by doing a raiserror with log. Or you can use
> sp_altermessage YourMessageNumber, 'with log', 'true'
> to log the message.
> -Sue
> On Fri, 19 May 2006 11:04:01 -0700, SteveIrwin
> <SteveIrwin@.discussions.microsoft.com> wrote:
> >I'm trying to have an alert fire when it receives an error via the RAISERROR
> >call. I have it working in SQL 2000, but can't get it to work for SQL 2005.
> >When I look at the history of the alert, it says that it has not been raised
> >yet.
> >
> >When I look at the log from SQLServerAgent, I see that it is missing the
> >stored procedure xp_sqlagent_notify. Where would I find this missing
> >procedure? I see that I have an sp_sqlagent_notify -- should I just rename or
> >copy it?
> >
> >Steve
>

Missing XML header that specifies the encoding

Hello,
In my solution I ned the xml output with including the XML header thet
specifies the encoding.
Here's the code:
CREATE XML SCHEMA COLLECTION MyNote AS
N'<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3schools.com" xmlns="http://
www.w3schools.com" elementFormDefault="qualified">
<xs:element name="note">
<xs:complexType>
<xs:sequence>
<xs:element name="to" type="xs:string"/>
<xs:element name="from" type="xs:string"/>
<xs:element name="heading" type="xs:string"/>
<xs:element name="body" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="HedingType" type="xs:string"/>
</xs:schema>'
GO
then input a valid xml
DECLARE @.x xml (dbo.MyNote)
SET @.x=N'<note xmlns="http://www.w3schools.com">
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this wend!</body>
</note>'
select @.x
Here's the output:
<note xmlns="http://www.w3schools.com">
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this wend!</body>
</note>
I need the XML header that specify the encoding of the document, like
this:
<?xml version="1.0" encoding="UTF-8"?>
<note xmlns="http://www.w3schools.com">
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this wend!</body>
</note>
Any ideas?
Thanks in advance!
JohnWell the heading is optional for UTF-8 documents. The heading's only useful
for serialised documents, how are you using the output?
Joe Fawcett (MVP - XML)
http://joe.fawcett.name
"johnk" <johnk_hansen@.hotmail.com> wrote in message
news:1170427960.566676.200010@.s48g2000cws.googlegroups.com...
> Hello,
> In my solution I ned the xml output with including the XML header thet
> specifies the encoding.
> Here's the code:
> CREATE XML SCHEMA COLLECTION MyNote AS
> N'<?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://www.w3schools.com" xmlns="http://
> www.w3schools.com" elementFormDefault="qualified">
> <xs:element name="note">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="to" type="xs:string"/>
> <xs:element name="from" type="xs:string"/>
> <xs:element name="heading" type="xs:string"/>
> <xs:element name="body" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="HedingType" type="xs:string"/>
> </xs:schema>'
> GO
> then input a valid xml
> DECLARE @.x xml (dbo.MyNote)
> SET @.x=N'<note xmlns="http://www.w3schools.com">
> <to>Tove</to>
> <from>Jani</from>
> <heading>Reminder</heading>
> <body>Don't forget me this wend!</body>
> </note>'
> select @.x
> Here's the output:
> <note xmlns="http://www.w3schools.com">
> <to>Tove</to>
> <from>Jani</from>
> <heading>Reminder</heading>
> <body>Don't forget me this wend!</body>
> </note>
> I need the XML header that specify the encoding of the document, like
> this:
> <?xml version="1.0" encoding="UTF-8"?>
> <note xmlns="http://www.w3schools.com">
> <to>Tove</to>
> <from>Jani</from>
> <heading>Reminder</heading>
> <body>Don't forget me this wend!</body>
> </note>
> Any ideas?
>
> Thanks in advance!
> John
>|||On 2 Feb, 17:46, "Joe Fawcett" <joefawc...@.newsgroup.nospam> wrote:
> Well the heading is optional for UTF-8 documents. The heading's only usefu
l
> for serialised documents, how are you using the output?
> --
> Joe Fawcett (MVP - XML)http://joe.fawcett.name
> "johnk" <johnk_han...@.hotmail.com> wrote in message
> news:1170427960.566676.200010@.s48g2000cws.googlegroups.com...
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> - Vis sitert tekst -
I am using the query window in MS SQL Server Management Studio .|||John,
The processing instruction specifies the encoding when the XML is stored as
text. When you store an instance in an XML datatype, it is not stored as tex
t
but in binary XML format. Therefore, what's the point of specifying an XML
encoding? It would have no meaning.
In your case, I would suggest you convert your XML instance to a string type
and
add the processing instruction trhough string manipulation. You can do somet
hing
like this
DECLARE @.x xml (dbo.MyNote)
DECLARE @.strXML varchar(MAX)
SET @.x=N'<note xmlns="http://www.w3schools.com">
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this wend!</body>
</note>'
set @.strXML = '<?xml version="1.0" encoding="UTF-8"?>' + CONVERT(varchar(MAX
),
@.x)
SELECT @.strXML
While we're talking about encoding of XML documents I've also noticed someth
ing
strange in your example. When you create your schema collection you do this
CREATE XML SCHEMA COLLECTION MyNote AS
N'<?xml version="1.0" encoding="UTF-8"?>
....
'
go
The string literal is unicode (because of the 'N' character that preceeds it
)
but yet you specify the encoding as UTF-8 in your processing instruction. Th
e
DDL as you've written it should fail with the following error: "XML parsing:
line 1, character 38, unable to switch the encoding"
Denis Ruckebusch
http://blogs.msdn.com/denisruc
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"johnk" <johnk_hansen@.hotmail.com> wrote in message
news:1170427960.566676.200010@.s48g2000cws.googlegroups.com...
> Hello,
> In my solution I ned the xml output with including the XML header thet
> specifies the encoding.
> Here's the code:
> CREATE XML SCHEMA COLLECTION MyNote AS
> N'<?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://www.w3schools.com" xmlns="http://
> www.w3schools.com" elementFormDefault="qualified">
> <xs:element name="note">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="to" type="xs:string"/>
> <xs:element name="from" type="xs:string"/>
> <xs:element name="heading" type="xs:string"/>
> <xs:element name="body" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="HedingType" type="xs:string"/>
> </xs:schema>'
> GO
> then input a valid xml
> DECLARE @.x xml (dbo.MyNote)
> SET @.x=N'<note xmlns="http://www.w3schools.com">
> <to>Tove</to>
> <from>Jani</from>
> <heading>Reminder</heading>
> <body>Don't forget me this wend!</body>
> </note>'
> select @.x
> Here's the output:
> <note xmlns="http://www.w3schools.com">
> <to>Tove</to>
> <from>Jani</from>
> <heading>Reminder</heading>
> <body>Don't forget me this wend!</body>
> </note>
> I need the XML header that specify the encoding of the document, like
> this:
> <?xml version="1.0" encoding="UTF-8"?>
> <note xmlns="http://www.w3schools.com">
> <to>Tove</to>
> <from>Jani</from>
> <heading>Reminder</heading>
> <body>Don't forget me this wend!</body>
> </note>
> Any ideas?
>
> Thanks in advance!
> John
>|||In addition to Denis' post: You cannot get UTF-8 encoded XML data produced.
SQL Server produces UTF-16 encoded XML when you cast it to
NVARCHAR/VARBINARY, or the encoding of the code page if you cast to
VARCHAR(not recommended).
Since the NVARCHAR/VARCHAR carries the encoding on the type, we do not add
an XML declaration with an encoding, so that if you cast your string to a
different collation, the encoding does get adjusted automatically.
Now if you cast it to VARBINARY we will add the UTF-16 BOM.
If you want to produce UTF-8 encoded XML or have the XML declaration added,
you probably should use the System.XML or MSXML components on the
client/midtier side.
Best regards
Michael
"johnk" <johnk_hansen@.hotmail.com> wrote in message
news:1170439250.695037.296940@.q2g2000cwa.googlegroups.com...
> On 2 Feb, 17:46, "Joe Fawcett" <joefawc...@.newsgroup.nospam> wrote:
> I am using the query window in MS SQL Server Management Studio .
>

Missing XML header that specifies the encoding

Hello,
In my solution I ned the xml output with including the XML header thet
specifies the encoding.
Here's the code:
CREATE XML SCHEMA COLLECTION MyNote AS
N'<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3schools.com" xmlns="http://
www.w3schools.com" elementFormDefault="qualified">
<xs:element name="note">
<xs:complexType>
<xs:sequence>
<xs:element name="to" type="xs:string"/>
<xs:element name="from" type="xs:string"/>
<xs:element name="heading" type="xs:string"/>
<xs:element name="body" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="HedingType" type="xs:string"/>
</xs:schema>'
GO
then input a valid xml
DECLARE @.x xml (dbo.MyNote)
SET @.x=N'<note xmlns="http://www.w3schools.com">
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>'
select @.x
Here's the output:
<note xmlns="http://www.w3schools.com">
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
I need the XML header that specify the encoding of the document, like
this:
<?xml version="1.0" encoding="UTF-8"?>
<note xmlns="http://www.w3schools.com">
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
Any ideas?
Thanks in advance!
John
Well the heading is optional for UTF-8 documents. The heading's only useful
for serialised documents, how are you using the output?
Joe Fawcett (MVP - XML)
http://joe.fawcett.name
"johnk" <johnk_hansen@.hotmail.com> wrote in message
news:1170427960.566676.200010@.s48g2000cws.googlegr oups.com...
> Hello,
> In my solution I ned the xml output with including the XML header thet
> specifies the encoding.
> Here's the code:
> CREATE XML SCHEMA COLLECTION MyNote AS
> N'<?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://www.w3schools.com" xmlns="http://
> www.w3schools.com" elementFormDefault="qualified">
> <xs:element name="note">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="to" type="xs:string"/>
> <xs:element name="from" type="xs:string"/>
> <xs:element name="heading" type="xs:string"/>
> <xs:element name="body" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="HedingType" type="xs:string"/>
> </xs:schema>'
> GO
> then input a valid xml
> DECLARE @.x xml (dbo.MyNote)
> SET @.x=N'<note xmlns="http://www.w3schools.com">
> <to>Tove</to>
> <from>Jani</from>
> <heading>Reminder</heading>
> <body>Don't forget me this weekend!</body>
> </note>'
> select @.x
> Here's the output:
> <note xmlns="http://www.w3schools.com">
> <to>Tove</to>
> <from>Jani</from>
> <heading>Reminder</heading>
> <body>Don't forget me this weekend!</body>
> </note>
> I need the XML header that specify the encoding of the document, like
> this:
> <?xml version="1.0" encoding="UTF-8"?>
> <note xmlns="http://www.w3schools.com">
> <to>Tove</to>
> <from>Jani</from>
> <heading>Reminder</heading>
> <body>Don't forget me this weekend!</body>
> </note>
> Any ideas?
>
> Thanks in advance!
> John
>
|||On 2 Feb, 17:46, "Joe Fawcett" <joefawc...@.newsgroup.nospam> wrote:
> Well the heading is optional for UTF-8 documents. The heading's only useful
> for serialised documents, how are you using the output?
> --
> Joe Fawcett (MVP - XML)http://joe.fawcett.name
> "johnk" <johnk_han...@.hotmail.com> wrote in message
> news:1170427960.566676.200010@.s48g2000cws.googlegr oups.com...
>
>
>
>
>
>
>
>
> - Vis sitert tekst -
I am using the query window in MS SQL Server Management Studio .
|||John,
The processing instruction specifies the encoding when the XML is stored as
text. When you store an instance in an XML datatype, it is not stored as text
but in binary XML format. Therefore, what's the point of specifying an XML
encoding? It would have no meaning.
In your case, I would suggest you convert your XML instance to a string type and
add the processing instruction trhough string manipulation. You can do something
like this
DECLARE @.x xml (dbo.MyNote)
DECLARE @.strXML varchar(MAX)
SET @.x=N'<note xmlns="http://www.w3schools.com">
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>'
set @.strXML = '<?xml version="1.0" encoding="UTF-8"?>' + CONVERT(varchar(MAX),
@.x)
SELECT @.strXML
While we're talking about encoding of XML documents I've also noticed something
strange in your example. When you create your schema collection you do this
CREATE XML SCHEMA COLLECTION MyNote AS
N'<?xml version="1.0" encoding="UTF-8"?>
.....
'
go
The string literal is unicode (because of the 'N' character that preceeds it)
but yet you specify the encoding as UTF-8 in your processing instruction. The
DDL as you've written it should fail with the following error: "XML parsing:
line 1, character 38, unable to switch the encoding"
Denis Ruckebusch
http://blogs.msdn.com/denisruc
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"johnk" <johnk_hansen@.hotmail.com> wrote in message
news:1170427960.566676.200010@.s48g2000cws.googlegr oups.com...
> Hello,
> In my solution I ned the xml output with including the XML header thet
> specifies the encoding.
> Here's the code:
> CREATE XML SCHEMA COLLECTION MyNote AS
> N'<?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://www.w3schools.com" xmlns="http://
> www.w3schools.com" elementFormDefault="qualified">
> <xs:element name="note">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="to" type="xs:string"/>
> <xs:element name="from" type="xs:string"/>
> <xs:element name="heading" type="xs:string"/>
> <xs:element name="body" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="HedingType" type="xs:string"/>
> </xs:schema>'
> GO
> then input a valid xml
> DECLARE @.x xml (dbo.MyNote)
> SET @.x=N'<note xmlns="http://www.w3schools.com">
> <to>Tove</to>
> <from>Jani</from>
> <heading>Reminder</heading>
> <body>Don't forget me this weekend!</body>
> </note>'
> select @.x
> Here's the output:
> <note xmlns="http://www.w3schools.com">
> <to>Tove</to>
> <from>Jani</from>
> <heading>Reminder</heading>
> <body>Don't forget me this weekend!</body>
> </note>
> I need the XML header that specify the encoding of the document, like
> this:
> <?xml version="1.0" encoding="UTF-8"?>
> <note xmlns="http://www.w3schools.com">
> <to>Tove</to>
> <from>Jani</from>
> <heading>Reminder</heading>
> <body>Don't forget me this weekend!</body>
> </note>
> Any ideas?
>
> Thanks in advance!
> John
>
|||In addition to Denis' post: You cannot get UTF-8 encoded XML data produced.
SQL Server produces UTF-16 encoded XML when you cast it to
NVARCHAR/VARBINARY, or the encoding of the code page if you cast to
VARCHAR(not recommended).
Since the NVARCHAR/VARCHAR carries the encoding on the type, we do not add
an XML declaration with an encoding, so that if you cast your string to a
different collation, the encoding does get adjusted automatically.
Now if you cast it to VARBINARY we will add the UTF-16 BOM.
If you want to produce UTF-8 encoded XML or have the XML declaration added,
you probably should use the System.XML or MSXML components on the
client/midtier side.
Best regards
Michael
"johnk" <johnk_hansen@.hotmail.com> wrote in message
news:1170439250.695037.296940@.q2g2000cwa.googlegro ups.com...
> On 2 Feb, 17:46, "Joe Fawcett" <joefawc...@.newsgroup.nospam> wrote:
> I am using the query window in MS SQL Server Management Studio .
>

Missing What To Start SQLServer Agent in EM

Installed Office service pack and it 'messed' up the Enterprise Manager. Af
ter reinstalling the client tools and the sp3a service pack all worked but s
cheduled jobs. It turns out that the SQL Server Agent is not running. It d
oesn't automatically start
up but can be started from DOS whereby my jobs in turn can execute with no p
roblem.
Would like to know what the proper registry setting for SQLServerAgent under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControl
Set\Services\SQLServerAgent should
be for SQL Server 8.0.859 with service pack 3a as suspect that the problem m
ay be there.
Otherwise open to suggestions so that do not have to backup, uninstall, and
reinstall 10 database.....
Thanxs,
dmatta59The first thing to do here is go into the Control Panel -> Admin Tools ->
Services applet & see if the SQLAgent$[instance] service is configured t
o
auto-start. Your post doesn't indicated that you've done that, so make sure
the service's "Startup Type" property is set to "Automatic". If it still
doesn't start automatically, check the Windows Event Log to see what's
wrong.
Regards,
Greg Linwood
SQL Server MVP
"dmatta59" <anonymous@.discussions.microsoft.com> wrote in message
news:6F7A83AF-FE7A-46EF-8F44-50C94788109C@.microsoft.com...
> Installed Office service pack and it 'messed' up the Enterprise Manager.
After reinstalling the client tools and the sp3a service pack all worked but
scheduled jobs. It turns out that the SQL Server Agent is not running. It
doesn't automatically start up but can be started from DOS whereby my jobs
in turn can execute with no problem.
> Would like to know what the proper registry setting for SQLServerAgent
under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControl
Set\Services\SQLServerAgent
should be for SQL Server 8.0.859 with service pack 3a as suspect that the
problem may be there.
> Otherwise open to suggestions so that do not have to backup, uninstall,
and reinstall 10 database.....
> Thanxs,
> dmatta59|||The SqlServerAgent is set to automatic. There used to be an error 8344 Supe
rSocket Error but after the registers were cleaned and errors removed the e
rror no longer appears. When viewing the registry for SQLServerAgent there
was some mention in one of
the previous posts about a "dependancies" which is not present so would app
reciate what the registry would look like for MSSQLSERVER and SQLSERVERAGENT
.
Again it works fine if started from a dos command line but most inconvienent
not to have it start automatically or start from within the EM.
Any suggestions?
dmatta59|||Have resolved the problem. Used scm.exe to install the SQLServerAgent servi
ce using the instructions on the following article:
http://groups.google.com/groups?q=i...tngxa06&rnum=21
**Please note that the in this case the sqlagent -c -v was working from the
dos prompt and the jobs could run properly. The only problem was that the S
QLServerAgent was not automatically starting or couldn't be started within E
M.
Thank you,
dmatta59

Missing VarBinary(MAX) filestream storage attribute

Hi
I found the filestream attribute in Beta 1 new features list, but
cannot find any reference to it in the CTP documentation. It allows
direct access to word documents stored in a VarBinary(MAX) column. By
direct access I mean a file path\name to the file as stored in the
database using SQL Server FileStream Agent, also this removes the 2GB
restriction on file size.
Thanks in Advance
vihsFilestream was cut from the SQL Server 2005 shortly after Beta 1.
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"vihs" <sanantram@.yahoo.com> wrote in message
news:1122310275.649266.69620@.g43g2000cwa.googlegroups.com...
> Hi
> I found the filestream attribute in Beta 1 new features list, but
> cannot find any reference to it in the CTP documentation. It allows
> direct access to word documents stored in a VarBinary(MAX) column. By
> direct access I mean a file path\name to the file as stored in the
> database using SQL Server FileStream Agent, also this removes the 2GB
> restriction on file size.
> Thanks in Advance
> vihs
>

Missing Values

Hello people,

I have been writing some queries and reports using SQL (with Crystal and ASP.NET), and have a problem. Something I often need to do is find the number of records for each month, so there is a date field and a currency field, and I need to sum all the currency values for each month.

Firstly, to get a group for each month of each year I am using ...GROUP BY Month(DateField), Year(DateField)
is this correct or is there a better way?

The more problematic thing is, where there are no records for certain month, of course this month does not show up in the query results. This is a problem when displaying results in a table/chart. Is there any way to force each month to appear (with a 0 in the SUMed field)?

Any advice would be most, most welcome,

Thanksyou could define a table say tblmonth and define a join, which will allways retrieve the a month even if there are no entries for that month|||I'll have a go at that, thanks

any idea what join that would be?|||I think it would be a left join (Outer joins allow select all from this side and show any matching on the other).

Give it a go and if what you get is silly switch to right join as there is a small chance I got it wrong.|||you'll need a table of months, or use an integers table to generate them

see Selecting all months even if they're missing (http://searchdatabase.techtarget.com/ateQuestionNResponse/0,289625,sid13_cid526288_tax285649,00.html) (site registration may be required, but it's free)|||Thanks for your help on this, I seem to have it working now.

I have a similar problem with a report I am writing in crystal reports. I am trying to create a group calendar from Outlook using a crosstab, but not all dates show up (if noone has an appointment booked on that day).

What I need is to do is get a datasource with a list of days which I can do a join on to force all dates to appear. The problem is that the dates from Outlook are just dates but other applications such as access, excel use date/time fields and so the join does not work! Does anyone know where I can get a data source of just dates to use in the join?|||a data source of just dates? yeah, you can generate it from an integers table

Missing Values

Hi,
Can anyone help me with a query?
Let say I have a table called tblTest with one int field called NumOfCall.
NumOfCall hold numbers in sequential order but some are missing. for
example the table has 100 records 1 - 105 and 4, 19, 32, 46, 86 are missing.
I need a query that will tell me what values are missing.
Thanks
FredFrinton wrote:
> Hi,
> Can anyone help me with a query?
> Let say I have a table called tblTest with one int field called NumOfCall.
> NumOfCall hold numbers in sequential order but some are missing. for
> example the table has 100 records 1 - 105 and 4, 19, 32, 46, 86 are missing.
> I need a query that will tell me what values are missing.
> Thanks
> Fred
Use a table (Numbers) that contains all the potential numbers you want
to look for:
SELECT num
FROM Numbers AS N
WHERE NOT EXISTS
(SELECT *
FROM tblTest
WHERE numofcall = N.num)
AND N.num BETWEEN 1 AND 100 ;
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||Another option is to use:
SELECT col + 1
FROM tbl
WHERE col < ( SELECT MAX( col ) FROM tbl )
AND NOT EXISTS( SELECT *
FROM tbl t1
WHERE t1.col = tbl.col + 1 ) ;
If you have series of missing numbers do:
SELECT start + 1, end - 1
FROM ( SELECT t1.col, MIN( t2.col )
FROM tbl t1
INNER JOIN tbl t2
WHERE t1.col < t2.col
GROUP BY t1.col ) D ( start, end )
WHERE start < end - 1 ;
--
Anith

Missing Values

Hi,
Can anyone help me with a query?
Let say I have a table called tblTest with one int field called NumOfCall.
NumOfCall hold numbers in sequential order but some are missing. for
example the table has 100 records 1 - 105 and 4, 19, 32, 46, 86 are missing.
I need a query that will tell me what values are missing.
Thanks
Fred
Frinton wrote:
> Hi,
> Can anyone help me with a query?
> Let say I have a table called tblTest with one int field called NumOfCall.
> NumOfCall hold numbers in sequential order but some are missing. for
> example the table has 100 records 1 - 105 and 4, 19, 32, 46, 86 are missing.
> I need a query that will tell me what values are missing.
> Thanks
> Fred
Use a table (Numbers) that contains all the potential numbers you want
to look for:
SELECT num
FROM Numbers AS N
WHERE NOT EXISTS
(SELECT *
FROM tblTest
WHERE numofcall = N.num)
AND N.num BETWEEN 1 AND 100 ;
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
|||Another option is to use:
SELECT col + 1
FROM tbl
WHERE col < ( SELECT MAX( col ) FROM tbl )
AND NOT EXISTS( SELECT *
FROM tbl t1
WHERE t1.col = tbl.col + 1 ) ;
If you have series of missing numbers do:
SELECT start + 1, end - 1
FROM ( SELECT t1.col, MIN( t2.col )
FROM tbl t1
INNER JOIN tbl t2
WHERE t1.col < t2.col
GROUP BY t1.col ) D ( start, end )
WHERE start < end - 1 ;
Anith

Missing Values

Hi,
Can anyone help me with a query?
Let say I have a table called tblTest with one int field called NumOfCall.
NumOfCall hold numbers in sequential order but some are missing. for
example the table has 100 records 1 - 105 and 4, 19, 32, 46, 86 are missing.
I need a query that will tell me what values are missing.
Thanks
FredFrinton wrote:
> Hi,
> Can anyone help me with a query?
> Let say I have a table called tblTest with one int field called NumOfCall.
> NumOfCall hold numbers in sequential order but some are missing. for
> example the table has 100 records 1 - 105 and 4, 19, 32, 46, 86 are missin
g.
> I need a query that will tell me what values are missing.
> Thanks
> Fred
Use a table (Numbers) that contains all the potential numbers you want
to look for:
SELECT num
FROM Numbers AS N
WHERE NOT EXISTS
(SELECT *
FROM tblTest
WHERE numofcall = N.num)
AND N.num BETWEEN 1 AND 100 ;
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||Another option is to use:
SELECT col + 1
FROM tbl
WHERE col < ( SELECT MAX( col ) FROM tbl )
AND NOT EXISTS( SELECT *
FROM tbl t1
WHERE t1.col = tbl.col + 1 ) ;
If you have series of missing numbers do:
SELECT start + 1, end - 1
FROM ( SELECT t1.col, MIN( t2.col )
FROM tbl t1
INNER JOIN tbl t2
WHERE t1.col < t2.col
GROUP BY t1.col ) D ( start, end )
WHERE start < end - 1 ;
Anith

Missing Value property of calculated member

Hi,

I defined several calculated measures in my cube. In Report Designer, i want to filter data depending a calculated measure.

Some caluclated measures are missing properties like value or ismissing. Anybody a hint, why these measures dont provide the properties, as for that filtering or hiding is not possible.

In AS every property is the sam for all calcs and the leaking calcs dont have difficult expressions (IIF(measure<0,measure/measure,0.0)

Thanks in advance

Please provide steps to repro this against the AdventureWorks sample cube.|||

Value property is working, even when it gets red underlined in visual studio.

So it works for me now.

Missing Value property of calculated member

Hi,

I defined several calculated measures in my cube. In Report Designer, i want to filter data depending a calculated measure.

Some caluclated measures are missing properties like value or ismissing. Anybody a hint, why these measures dont provide the properties, as for that filtering or hiding is not possible.

In AS every property is the sam for all calcs and the leaking calcs dont have difficult expressions (IIF(measure<0,measure/measure,0.0)

Thanks in advance

Please provide steps to repro this against the AdventureWorks sample cube.|||

Value property is working, even when it gets red underlined in visual studio.

So it works for me now.

Missing Value Grouping

Newbie SQL Question.

I need to build a results grid that reports totals or zero for an attribute

SELECT ClaimType, VendorNumber,
COUNT (ClaimNumber) AS ClaimCount
FROM ClaimHeader
GROUP BY VendorNumber, ClaimType
ORDER BY VendorNumber ASC;

THe underlying data has two claim types (UB, and HCFA). Some vendor numbers have only UB claims or only HCFA claims. I want my totals to show a zero for those vendor numbers. Example

VendorNumber ClaimType ClaimCount
234 UB 21
234 HCFA 12
235 UB 0
235 HCFA 15

My current group by doesn't give me the 3rd row in my example. How do I change my query to add those rows that have no claims as a zero. Put another way, every vendorNumber has to report a HCFA total and a UB total, even if they're zero.

Thanks.This is flat-out "brute force" to get the job done using only what you've given us... There is almost certainly a better way.SELECT v.VendorNumber, c.ClaimType, (SELECT Coalesce(Count(*), 0)
FROM ClaimHeader AS ch
WHERE ch.VendorNumber = v.VendorNumber
AND ch.ClaimType = c.ClaimType) AS ClaimCount
FROM (SELECT DISTINCT VendorNumber
FROM ClaimHeader) AS v
CROSS JOIN (SELECT DISTINCT ClaimType
FROM ClaimHeader) AS c-PatP|||Is something else I could provide to help with my question? This might b closer but i'm still missing the zeros for providers with not HCFA or UB claims.

SELECT t.PeriodID, p.ProviderName, p.AltProviderID_1,
t.FormTypeID,
ClaimCount = CASE WHEN SUM(ClaimCount) IS NULL THEN 0 ELSE SUM(ClaimCount) END

FROM dvTATClaim t
INNER JOIN dimProvider p
ON t.ProviderID = p.ProviderID|||Sure...provide the DDL of the table

CREATE TABLE myTable...

Some Sample Data

INSERT INTO myTable(
SELECT 'data' UNION ALL
SELECT 'data' UNION ALL
ect

And what the results should look like...

You could probably use a stop watch to time how long it takes after you post that for your answer...|||Are there other tables that have:
1. Every possible VendorNumber
2. Every possible ClaimType

Also, did the previous query I provided give you the results that you want?

-PatP

missing value

hi,

I am using time series algorithm.and my prediction query is like this

SELECT PredictTimeSeries([Performance]) FROM [Stud_Model]

The output is like this

Date Perf

9/11/2006 90

10/11/2006 92

11/11/2006 93

12/11/2006 -- (no prediction)

1/11/2007 --(no prediction)

I dnt know why there is no prediction after certail date?

Thanks,

Karthik

The time series algorithm is based on regression trees which can become unstable as you move away from the time horizon, since you have predictions based on predictions. The algorithm tries to detect when this instability occurs and stops predicting at that point.

In future releases, we will have more user control over prediction stability and the behavior of the algorithm around this stability.

Missing Triggers on SQL 2005/Server Management Studio

I have a few SQL 2005 databases set up, some of which have triggers.

Recently, the database triggers stopped appearing in SMS. They are still there. They still run. I can still manually CREATE, ALTER, or DROP triggers via SQL queries. However, when I open a database and navigate to Programmability > Database Triggers nothing shows up. Right clicking the folder produces no worthwhile options (just Reports and Refresh).

Until this puzzling change occured a few days ago, triggers were appearing in the aforementioned location. Right clicking yielded many options including the options to create, drop or whatever else. I thought this might be a permissions issue, but as I said, I can still work on triggers via queries.

Does anyone have any idea what is going on?

Thanks, Jeff

I don't think you found triggers under programmability. You found stored procedures there.

The triggers are the expansions of the tables not the database.

Drop down the table and you'll see the triggers.

Adamus

|||

i hope the trigger you mentioned is DDL trigger. you can make DDL triggers are of two scope. one database level and the other one at the server level. The database trigger can found in Database Programability -- Database triggers.

the server level trigger can be seen in Server Object -- Server Triggers

System objects for DDL Triggers

You can use the sys.triggers catalog view to see database-level DDL triggers. The parent_class column in this catalog view has 0 as the value for DDL triggers. You can use the sys.server_triggers catalog view to get a list of server-level DDL triggers. The sys.trigger_events and sys.server_trigger_events catalog views contain a row for each time a database-level and server-level trigger was fired, respectively.

also read these


Query System Object for DDL

SELECT Name, s.type_desc SQL_or_CLR,is_disabled, e.type_desc FiringEvents
FROM sys.server_triggers s
INNER JOIN sys.server_trigger_events e ON s.object_id = e.object_id

Where can I find DDL trigger in SSMO

Databaselevel DDL triggers are listed in the Programmability\Database Triggers folder in Object Explorer. The server-level triggers are listed under the Server Objects\Triggers folder in Object Explorer.

Delete DDL Trigger

The ON DATABASE or ON ALL SERVER clause should be used with DROP TRIGGER to delete a DDL trigger, ALTER TRIGGER to modify a DDL trigger definition, DISABLE TRIGGER to disable a DDL trigger, and ENABLE TRIGGER to enable a DDL trigger.

Permission
The CONTROL SERVER permission is required to create a DDL trigger at the server scope, and ALTER ANY TRIGGER permission is required to create a DDL trigger at the database scope

Madhu

|||Thank you both of you! Both posts were helpful, but Adamus more directly answered my question. I could swear that the triggers I had created were found in Programmability but now I see some of them in the table expansion themselves.

Monday, March 12, 2012

Missing Triggers

Hi,
I had a problem with a 12GB Database, where a failure on
the disks damaged the datafiles, leaving the database in
Suspect mode.
I managed to recover most of the data, with some data
missing from where the Data Pages where damaged.
No backups on this one (as usual), they where failing for
2 months :(
Then i created a new database, optimized for that size (5
datafiles top size=3.5GB) and moved the data.
And there it whnt online for users access
But somewhere on the process i forgot to activate the
triggers, when i detected my mistake the DB had already 1
week on prodution.
My question is: is there any way to force the Triggers to
execute (Insert) on data alread on a table?> My question is: is there any way to force the Triggers to
> execute (Insert) on data alread on a table?
No, but depending on what your trigger code did, you could probably run a
manual update/insert process ...
--
http://www.aspfaq.com/
(Reverse address to reply.)|||>No, but depending on what your trigger code did, you could probably run a
>manual update/insert process ...
Hi, thanks for your reply
Yes i've tried to retransfer data using the export data, but it seems that it disables the triggers before inserting data.
I also tried to do a "insert into" a copy of the db but some of the tables have a timestamp field that doesn=B4t allow inserting data with a timestamp already on it.
Paulo Ferreira

Missing Triggers

Hi,
I had a problem with a 12GB Database, where a failure on
the disks damaged the datafiles, leaving the database in
Suspect mode.
I managed to recover most of the data, with some data
missing from where the Data Pages where damaged.
No backups on this one (as usual), they where failing for
2 months
Then i created a new database, optimized for that size (5
datafiles top size=3.5GB) and moved the data.
And there it whnt online for users access
But somewhere on the process i forgot to activate the
triggers, when i detected my mistake the DB had already 1
week on prodution.
My question is: is there any way to force the Triggers to
execute (Insert) on data alread on a table?
> My question is: is there any way to force the Triggers to
> execute (Insert) on data alread on a table?
No, but depending on what your trigger code did, you could probably run a
manual update/insert process ...
http://www.aspfaq.com/
(Reverse address to reply.)
|||>No, but depending on what your trigger code did, you=20
could probably run a
>manual update/insert process ...
Hi, thanks for your reply
Yes i've tried to retransfer data using the export data,=20
but it seems that it disables the triggers before=20
inserting data.
I also tried to do a "insert into" a copy of the db but=20
some of the tables have a timestamp field that doesn=B4t=20
allow inserting data with a timestamp already on it.
Paulo Ferreira