Showing posts with label return. Show all posts
Showing posts with label return. Show all posts

Wednesday, March 28, 2012

Multi Select Parameter Problem

I have a multi-select parameter for a report, but If I select more than one value the report does not return any data. However, if only one value is selected data for that value is returned. I am using the IN option for the SP parameter.

SELECT Code,Description FROM Product

WHERE Code > 0 AND Description IN (@.Description)

I am using SP2 on SQL2005, also I do not have the option of Select-All which I expected to be present.
Any help would be most appreiated.

Thanks

JohnJames

Did you try running the same scenario in SQL query analyser.

A sample data with your executable statements what you have tried in sql server to get the result might help to focus on the issue

|||Hi Raj

Thanks for your reply.
Two values I am selecting are Radio,Television.

These are selected from the Report Viewer.
I have captured values in Temp table and the appear to be correct.

I suspect it is the way SQL Server is interpreting the csv list of values.
|||It does appear to be a problem with the SP.
If I copy the SQL to query designer in the report
the multi-select parameters work fine.
I have written a T-SQL Split function to overcome the problem,
but I am a little surprised that the SP cannot handle the
multi-select parameter.
Is this a problem other developers have come across ?
or is it something wrong I am doing.

JohnJames

Friday, March 23, 2012

Mulitple Queries in a Stored Procedure

I have written a stored procedure that contains queries which return data.
It works correctly in Query Analyzer, returning each of the labled fields.
When I create a report the only return field the report wizard shows is from
the first query. When I add each of the other return fields and run the
report in VS I get an out of index error.RS only supports a single resultset being returned.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"bassbuster" <bassbuster@.discussions.microsoft.com> wrote in message
news:39FAA817-C491-493D-81BB-FDA153D7DB57@.microsoft.com...
> I have written a stored procedure that contains queries which return data.
> It works correctly in Query Analyzer, returning each of the labled fields.
> When I create a report the only return field the report wizard shows is
> from
> the first query. When I add each of the other return fields and run the
> report in VS I get an out of index error.

Wednesday, March 21, 2012

MSXML3: Reference to undeclared namespace prefix: 'sql'.

I have a vb com+ object that has a function that is supposed to return some XML from the database. It gets the XML via an ADO stream object. However, when I run the VB from its test harness in the project group it gives the following error;
MSXML3: Reference to undeclared namespace prefix: 'sql'.
My project references has;
MS ActiveX Data Objects 2.6 Library
MS XML v4.0
If I debug print the XML out it before writing it to the stream it gives ;
<ROOT xmlns:sql='urn:schemas-microsoft-com:xml-sql'><sql:header><sql:param name='ID'>
1
</sql:param></sql:header><sql:query>
exec sp100PaAddress_Select @.ID
</sql:query></ROOT>
"Richard P" <anonymous@.discussions.microsoft.com> wrote in message
news:3D95465D-CAD3-41CF-894E-B4077DF9B75C@.microsoft.com...
> I have a vb com+ object that has a function that is supposed to return
some XML from the database. It gets the XML via an ADO stream object.
However, when I run the VB from its test harness in the project group it
gives the following error;
> MSXML3: Reference to undeclared namespace prefix: 'sql'.
Try posting the code that is causing the error...
Bryant

Monday, March 12, 2012

MSSQLSERVER ERROR

I got this message:
Could not start MSSQLSERVER service on Local Computer.
The service did not return an error. This could be an internal Windows
error or an internal service error.
Any clues from anyone?
Thanks
cleb1 wrote:
> I got this message:
> Could not start MSSQLSERVER service on Local Computer.
> The service did not return an error. This could be an internal
> Windows error or an internal service error.
> Any clues from anyone?
> Thanks
Check the account you are running SQL Server under (from Services) and
make sure it is still valid.
Check the event log for any other information.
David G.
|||Please post your SQL errorlog for review.
Thank you for using Microsoft newsgroups.
Sincerely
Pankaj Agarwal
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Friday, March 9, 2012

MSSQLError overwriting returning XML

Hello All,
Is there a way to have an xml template call not just return the
MSSQLError processing instructions but to also return a XML that I'm
expected to receive?
I am using Microsoft SQL Server 2000 with latest service pack, SQLXML
2.0, and Microsoft Windows Server 2003.
My xml template calls a stored procedure that inserts some data into
some tables and the stored procedure will always return some other data
back in a XML (using for xml explicit). The table contains unique,
foreign, and primary key constraints, so if the inserted data fails a
constraint (for AuthNo column), the stored procedure will continually
generates a new value for AuthNo and adds it into the table again.
As you can see, if the xml template is called during high volume times,
the database will raise errors on unique key constraint failures. I
need to see my resultant XML, and I don't care about the number of
MSSQLErrors PIs (from testing, I see a min of one PI and a max of 15
PIs). I have two applications calling the xml template in two different
ways, and have another application that explicitly calls the stored
procedure.
When explicitly calling the stored procedure using Query Analyzer, I
see the errors being printed and also my generated XML. I believe that
I always see the generated XML from my C application that calls the XML
template with XMLDOM. I only see the MSQLErrors PI when my ASP page,
using Javascript and Microsoft.XMLDOM, calls the XML template.
In that ASP page scenario, I see that my stored procedure succeeded in
adding data into the table. So somehow, the MSQLErrors PI is
overwriting or needlessly clearing out my stored proc-generated XML.
Can any of you help me figure out how to still have my generated XML be
returned? If there's no errors, I see the sp-generated XML result fine.
Before you ask or make any suggestions, yes, I need those unique
constraints. I cannot use indexes to generate this AuthNo since I have
to conform to a specific algorithm. I do not want to query the table
for existence for an AuthNo to put in since there exist the possibility
that the insert call would be too late because some other app also used
the same AuthNo value.
Please help,
Marcus GrantThere's no way to do this directly, no. You could apply an XSLT to the
results of the template to strip out the errors. That would be my
suggestion.
Irwin
<grantmarcus@.gmail.com> wrote in message
news:1112130864.698392.128370@.o13g2000cwo.googlegroups.com...
> Hello All,
> Is there a way to have an xml template call not just return the
> MSSQLError processing instructions but to also return a XML that I'm
> expected to receive?
> I am using Microsoft SQL Server 2000 with latest service pack, SQLXML
> 2.0, and Microsoft Windows Server 2003.
> My xml template calls a stored procedure that inserts some data into
> some tables and the stored procedure will always return some other data
> back in a XML (using for xml explicit). The table contains unique,
> foreign, and primary key constraints, so if the inserted data fails a
> constraint (for AuthNo column), the stored procedure will continually
> generates a new value for AuthNo and adds it into the table again.
> As you can see, if the xml template is called during high volume times,
> the database will raise errors on unique key constraint failures. I
> need to see my resultant XML, and I don't care about the number of
> MSSQLErrors PIs (from testing, I see a min of one PI and a max of 15
> PIs). I have two applications calling the xml template in two different
> ways, and have another application that explicitly calls the stored
> procedure.
> When explicitly calling the stored procedure using Query Analyzer, I
> see the errors being printed and also my generated XML. I believe that
> I always see the generated XML from my C application that calls the XML
> template with XMLDOM. I only see the MSQLErrors PI when my ASP page,
> using Javascript and Microsoft.XMLDOM, calls the XML template.
> In that ASP page scenario, I see that my stored procedure succeeded in
> adding data into the table. So somehow, the MSQLErrors PI is
> overwriting or needlessly clearing out my stored proc-generated XML.
> Can any of you help me figure out how to still have my generated XML be
> returned? If there's no errors, I see the sp-generated XML result fine.
> Before you ask or make any suggestions, yes, I need those unique
> constraints. I cannot use indexes to generate this AuthNo since I have
> to conform to a specific algorithm. I do not want to query the table
> for existence for an AuthNo to put in since there exist the possibility
> that the insert call would be too late because some other app also used
> the same AuthNo value.
> Please help,
> Marcus Grant
>|||The XML returned by the XML template call will only contain the errors.
I traced the output, made a temp ASP page that displays the returning
XML, and added a call to window.open() on the XML that's return on the
real ASP page. All of them do not have my intended, generated XML for
the xml template call.
Stripping the errors would just give me a empty XML.
How would I do this indirectly? Can you validate my statement that the
MSSQLErrors are overwriting what's being returned? This is a problem in
an production environment and we were unaware of this unintended
behavior.
Thank you for answering my question,
Marcus Grant|||Can you post the template?
Irwin
<grantmarcus@.gmail.com> wrote in message
news:1112705431.302580.77210@.l41g2000cwc.googlegroups.com...
> The XML returned by the XML template call will only contain the errors.
> I traced the output, made a temp ASP page that displays the returning
> XML, and added a call to window.open() on the XML that's return on the
> real ASP page. All of them do not have my intended, generated XML for
> the xml template call.
> Stripping the errors would just give me a empty XML.
> How would I do this indirectly? Can you validate my statement that the
> MSSQLErrors are overwriting what's being returned? This is a problem in
> an production environment and we were unaware of this unintended
> behavior.
> Thank you for answering my question,
> Marcus Grant
>|||I'll post a similar template that does the same thing. I'll also post
the schema and the stored procedure. This verison is bare minimum of
what I'm trying to achieve. End result is the same.
Once you create the table, stored proc, and run the xml template,
you'll only see the errors. If you query the table, you'll see the data
being inserted fine.
Because of multithreading / multiapplication, we said "hey, let the
database handle the uniqueness of the authorization number. If it
already exist, we just create a new one."
Watch out for word wrappings. And thanks again for looking into this
issue.
Here's the xml template:
-- START Activity_Add.XML template --
<root xmlns:sql="urn:schemas-microsoft-com:xml-sql">
<sql:header nullvalue="NULLVALUE">
<sql:param name="data">NULLVALUE</sql:param>
</sql:header>
<sql:query client-side-xml="1">
exec Activity_Add @.data
for xml explicit
</sql:query>
</root>
-- END Activity_Add.xml TEMPLATE --
-- START SQL schema / stored proc --
drop table Activity
create table Activity
(
dateseq integer, -- YYYYMMDD
authno integer, -- Unique algorithm for a day
data varchar(10), -- Fluff data
primary key (dateseq,authno) -- For each day, there exists unique
authno
)
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO
-- Drop the stored procedure if it exists
if exists (select * from sysobjects where id =
object_id(N'[dbo].[Activity_Add]') and OBJECTPROPERTY(id,
N'IsProcedure') = 1)
drop procedure [dbo].[Activity_Add]
GO
-- Generate the stored procedure that tries adding a second row with
the same primary key before and then adds it again with a different
key.
CREATE PROCEDURE Activity_Add
(
@.Data As varchar(10)
)
AS
-- Do not return number of rows affected
SET NOCOUNT ON
-- Declare local variables
Declare @.rc integer
Declare @.DateSeq integer
Declare @.AuthNo integer
-- Set default values for local variables
Set @.rc = 0
Set @.DateSeq = 20050405 -- April 5, 2005
Set @.AuthNo = 12345678 -- Cheap unique number for the day
-- Insert the first row into the table
insert into Activity
values
(
@.DateSeq,
@.AuthNo,
@.Data -- Data to add
)
-- This should return success
Set @.rc = @.@.ERROR
-- This is pretty much needless since it's 0
if (0 = @.rc)
begin
-- Now try adding a row with the same primary key
insert into Activity
values
(
@.DateSeq, -- Same dateseq
@.AuthNo, -- Same authno
'data2' -- Different fluff data
)
-- Should fail
Set @.rc = @.@.ERROR
end
if ( (2627 = @.rc) -- Is it a primary key constraint?
or (2601 = @.rc) -- Or a unique key constraint.
)
begin
-- Now generate a different authno to please the constraints
Set @.AuthNo = @.AuthNo + 1
insert into Activity
values
(
@.DateSeq, -- Same dateseq
@.AuthNo, -- Different authno
'data2' -- fluff data to add
)
end
-- Return something in XML form
select
1 As Tag,
NULL As Parent,
@.AuthNo As [RESPONSE!1!AuthNum],
@.rc as [RESPONSE!1!ResponseCode]
-- Return the return code also
return @.rc
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO
-- END SQL schema / stored proc --
Thanks yet again,
Marcus|||On a similar note, we just came across as situation where a different
xml template call does return the expected XML while returning an
MSSQLError PI.
The xml template passes in the parameters as is to a stored procedure
that does the real work (similar to my ealier problem and example...
which isn't fixed yet).
For this situation, we accidentally passed in a parameter as using
alpha characters while the underlying stored procedure expects the
parameter to be an int. The MSSQLError PI says there's error in
converting a varchar into an int.
The surprising thing is that I would have expected the execution to
stop right there instead of continuing on, which is what query analyzer
does.
So it seems like I'm having two problems:
1) An error raised by an underlying stored procedure call will cause
the xml template to only display the MSSQLError PIs when it should also
diplay the expected resultant XML.
2) An error raised by the logic in the xml template will display the
MSSQLError PI and continue processing when it should just stop
execution and just return the PI.
Are these bugs in the SQLXML 3.0 and under? Or am I doing things wrong?
Thanks for the help,
Marcus Grant|||I think this has to do with how we parse the results of Sprocs returning
mutliple resultsets and converting them into XML on the client. I'll have
one of our devs look at it.
Irwin
<grantmarcus@.gmail.com> wrote in message
news:1113254695.680546.203430@.o13g2000cwo.googlegroups.com...
> On a similar note, we just came across as situation where a different
> xml template call does return the expected XML while returning an
> MSSQLError PI.
> The xml template passes in the parameters as is to a stored procedure
> that does the real work (similar to my ealier problem and example...
> which isn't fixed yet).
> For this situation, we accidentally passed in a parameter as using
> alpha characters while the underlying stored procedure expects the
> parameter to be an int. The MSSQLError PI says there's error in
> converting a varchar into an int.
> The surprising thing is that I would have expected the execution to
> stop right there instead of continuing on, which is what query analyzer
> does.
> So it seems like I'm having two problems:
> 1) An error raised by an underlying stored procedure call will cause
> the xml template to only display the MSSQLError PIs when it should also
> diplay the expected resultant XML.
> 2) An error raised by the logic in the xml template will display the
> MSSQLError PI and continue processing when it should just stop
> execution and just return the PI.
> Are these bugs in the SQLXML 3.0 and under? Or am I doing things wrong?
> Thanks for the help,
> Marcus Grant
>|||Thanks for looking into this.
In hindsight, we shouldn't have assumed that things that work through
query analyzer will also work with a XML template call.
For people interested, we found a work around for the first problem.
Originally we have a constraint on a table for a unique number per day.
We have an algorithm to determine the unique number (two calls at the
same exact time from different threads will generate the same number).
We do a blind insert into a table with the unique number, check for
unique constraint error, and just loop again indefinitely; creating a
unique number and adding to the table until the insertion is
successful.
Our fix is to disregard the number generation algorithm (luckily we
didn't have to conform to it after all), create a table with a
pre-generated list of unique numbers, and upon inserting to the table,
retrieve a non-used generated number and add it into the table. This
ensures that the unique number will only be added one time per day.
The second problem was just a manual testing bug and shouldn't ever
occur in production.
Thanks,
Marcus Grant

MSSQLError overwriting returning XML

Hello All,
Is there a way to have an xml template call not just return the
MSSQLError processing instructions but to also return a XML that I'm
expected to receive?
I am using Microsoft SQL Server 2000 with latest service pack, SQLXML
2.0, and Microsoft Windows Server 2003.
My xml template calls a stored procedure that inserts some data into
some tables and the stored procedure will always return some other data
back in a XML (using for xml explicit). The table contains unique,
foreign, and primary key constraints, so if the inserted data fails a
constraint (for AuthNo column), the stored procedure will continually
generates a new value for AuthNo and adds it into the table again.
As you can see, if the xml template is called during high volume times,
the database will raise errors on unique key constraint failures. I
need to see my resultant XML, and I don't care about the number of
MSSQLErrors PIs (from testing, I see a min of one PI and a max of 15
PIs). I have two applications calling the xml template in two different
ways, and have another application that explicitly calls the stored
procedure.
When explicitly calling the stored procedure using Query Analyzer, I
see the errors being printed and also my generated XML. I believe that
I always see the generated XML from my C application that calls the XML
template with XMLDOM. I only see the MSQLErrors PI when my ASP page,
using Javascript and Microsoft.XMLDOM, calls the XML template.
In that ASP page scenario, I see that my stored procedure succeeded in
adding data into the table. So somehow, the MSQLErrors PI is
overwriting or needlessly clearing out my stored proc-generated XML.
Can any of you help me figure out how to still have my generated XML be
returned? If there's no errors, I see the sp-generated XML result fine.
Before you ask or make any suggestions, yes, I need those unique
constraints. I cannot use indexes to generate this AuthNo since I have
to conform to a specific algorithm. I do not want to query the table
for existence for an AuthNo to put in since there exist the possibility
that the insert call would be too late because some other app also used
the same AuthNo value.
Please help,
Marcus Grant
There's no way to do this directly, no. You could apply an XSLT to the
results of the template to strip out the errors. That would be my
suggestion.
Irwin
<grantmarcus@.gmail.com> wrote in message
news:1112130864.698392.128370@.o13g2000cwo.googlegr oups.com...
> Hello All,
> Is there a way to have an xml template call not just return the
> MSSQLError processing instructions but to also return a XML that I'm
> expected to receive?
> I am using Microsoft SQL Server 2000 with latest service pack, SQLXML
> 2.0, and Microsoft Windows Server 2003.
> My xml template calls a stored procedure that inserts some data into
> some tables and the stored procedure will always return some other data
> back in a XML (using for xml explicit). The table contains unique,
> foreign, and primary key constraints, so if the inserted data fails a
> constraint (for AuthNo column), the stored procedure will continually
> generates a new value for AuthNo and adds it into the table again.
> As you can see, if the xml template is called during high volume times,
> the database will raise errors on unique key constraint failures. I
> need to see my resultant XML, and I don't care about the number of
> MSSQLErrors PIs (from testing, I see a min of one PI and a max of 15
> PIs). I have two applications calling the xml template in two different
> ways, and have another application that explicitly calls the stored
> procedure.
> When explicitly calling the stored procedure using Query Analyzer, I
> see the errors being printed and also my generated XML. I believe that
> I always see the generated XML from my C application that calls the XML
> template with XMLDOM. I only see the MSQLErrors PI when my ASP page,
> using Javascript and Microsoft.XMLDOM, calls the XML template.
> In that ASP page scenario, I see that my stored procedure succeeded in
> adding data into the table. So somehow, the MSQLErrors PI is
> overwriting or needlessly clearing out my stored proc-generated XML.
> Can any of you help me figure out how to still have my generated XML be
> returned? If there's no errors, I see the sp-generated XML result fine.
> Before you ask or make any suggestions, yes, I need those unique
> constraints. I cannot use indexes to generate this AuthNo since I have
> to conform to a specific algorithm. I do not want to query the table
> for existence for an AuthNo to put in since there exist the possibility
> that the insert call would be too late because some other app also used
> the same AuthNo value.
> Please help,
> Marcus Grant
>
|||The XML returned by the XML template call will only contain the errors.
I traced the output, made a temp ASP page that displays the returning
XML, and added a call to window.open() on the XML that's return on the
real ASP page. All of them do not have my intended, generated XML for
the xml template call.
Stripping the errors would just give me a empty XML.
How would I do this indirectly? Can you validate my statement that the
MSSQLErrors are overwriting what's being returned? This is a problem in
an production environment and we were unaware of this unintended
behavior.
Thank you for answering my question,
Marcus Grant
|||Can you post the template?
Irwin
<grantmarcus@.gmail.com> wrote in message
news:1112705431.302580.77210@.l41g2000cwc.googlegro ups.com...
> The XML returned by the XML template call will only contain the errors.
> I traced the output, made a temp ASP page that displays the returning
> XML, and added a call to window.open() on the XML that's return on the
> real ASP page. All of them do not have my intended, generated XML for
> the xml template call.
> Stripping the errors would just give me a empty XML.
> How would I do this indirectly? Can you validate my statement that the
> MSSQLErrors are overwriting what's being returned? This is a problem in
> an production environment and we were unaware of this unintended
> behavior.
> Thank you for answering my question,
> Marcus Grant
>
|||I'll post a similar template that does the same thing. I'll also post
the schema and the stored procedure. This verison is bare minimum of
what I'm trying to achieve. End result is the same.
Once you create the table, stored proc, and run the xml template,
you'll only see the errors. If you query the table, you'll see the data
being inserted fine.
Because of multithreading / multiapplication, we said "hey, let the
database handle the uniqueness of the authorization number. If it
already exist, we just create a new one."
Watch out for word wrappings. And thanks again for looking into this
issue.
Here's the xml template:
-- START Activity_Add.XML template --
<root xmlns:sql="urn:schemas-microsoft-com:xml-sql">
<sql:header nullvalue="NULLVALUE">
<sql:param name="data">NULLVALUE</sql:param>
</sql:header>
<sql:query client-side-xml="1">
exec Activity_Add @.data
for xml explicit
</sql:query>
</root>
-- END Activity_Add.xml TEMPLATE --
-- START SQL schema / stored proc --
drop table Activity
create table Activity
(
dateseq integer, -- YYYYMMDD
authno integer, -- Unique algorithm for a day
data varchar(10), -- Fluff data
primary key (dateseq,authno) -- For each day, there exists unique
authno
)
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO
-- Drop the stored procedure if it exists
if exists (select * from sysobjects where id =
object_id(N'[dbo].[Activity_Add]') and OBJECTPROPERTY(id,
N'IsProcedure') = 1)
drop procedure [dbo].[Activity_Add]
GO
-- Generate the stored procedure that tries adding a second row with
the same primary key before and then adds it again with a different
key.
CREATE PROCEDURE Activity_Add
(
@.Data As varchar(10)
)
AS
-- Do not return number of rows affected
SET NOCOUNT ON
-- Declare local variables
Declare @.rc integer
Declare @.DateSeq integer
Declare @.AuthNo integer
-- Set default values for local variables
Set @.rc = 0
Set @.DateSeq = 20050405 -- April 5, 2005
Set @.AuthNo = 12345678 -- Cheap unique number for the day
-- Insert the first row into the table
insert into Activity
values
(
@.DateSeq,
@.AuthNo,
@.Data -- Data to add
)
-- This should return success
Set @.rc = @.@.ERROR
-- This is pretty much needless since it's 0
if (0 = @.rc)
begin
-- Now try adding a row with the same primary key
insert into Activity
values
(
@.DateSeq, -- Same dateseq
@.AuthNo, -- Same authno
'data2' -- Different fluff data
)
-- Should fail
Set @.rc = @.@.ERROR
end
if ( (2627 = @.rc) -- Is it a primary key constraint?
or (2601 = @.rc) -- Or a unique key constraint.
)
begin
-- Now generate a different authno to please the constraints
Set @.AuthNo = @.AuthNo + 1
insert into Activity
values
(
@.DateSeq, -- Same dateseq
@.AuthNo, -- Different authno
'data2' -- fluff data to add
)
end
-- Return something in XML form
select
1 As Tag,
NULL As Parent,
@.AuthNo As [RESPONSE!1!AuthNum],
@.rc as [RESPONSE!1!ResponseCode]
-- Return the return code also
return @.rc
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO
-- END SQL schema / stored proc --
Thanks yet again,
Marcus
|||On a similar note, we just came across as situation where a different
xml template call does return the expected XML while returning an
MSSQLError PI.
The xml template passes in the parameters as is to a stored procedure
that does the real work (similar to my ealier problem and example...
which isn't fixed yet).
For this situation, we accidentally passed in a parameter as using
alpha characters while the underlying stored procedure expects the
parameter to be an int. The MSSQLError PI says there's error in
converting a varchar into an int.
The surprising thing is that I would have expected the execution to
stop right there instead of continuing on, which is what query analyzer
does.
So it seems like I'm having two problems:
1) An error raised by an underlying stored procedure call will cause
the xml template to only display the MSSQLError PIs when it should also
diplay the expected resultant XML.
2) An error raised by the logic in the xml template will display the
MSSQLError PI and continue processing when it should just stop
execution and just return the PI.
Are these bugs in the SQLXML 3.0 and under? Or am I doing things wrong?
Thanks for the help,
Marcus Grant
|||I think this has to do with how we parse the results of Sprocs returning
mutliple resultsets and converting them into XML on the client. I'll have
one of our devs look at it.
Irwin
<grantmarcus@.gmail.com> wrote in message
news:1113254695.680546.203430@.o13g2000cwo.googlegr oups.com...
> On a similar note, we just came across as situation where a different
> xml template call does return the expected XML while returning an
> MSSQLError PI.
> The xml template passes in the parameters as is to a stored procedure
> that does the real work (similar to my ealier problem and example...
> which isn't fixed yet).
> For this situation, we accidentally passed in a parameter as using
> alpha characters while the underlying stored procedure expects the
> parameter to be an int. The MSSQLError PI says there's error in
> converting a varchar into an int.
> The surprising thing is that I would have expected the execution to
> stop right there instead of continuing on, which is what query analyzer
> does.
> So it seems like I'm having two problems:
> 1) An error raised by an underlying stored procedure call will cause
> the xml template to only display the MSSQLError PIs when it should also
> diplay the expected resultant XML.
> 2) An error raised by the logic in the xml template will display the
> MSSQLError PI and continue processing when it should just stop
> execution and just return the PI.
> Are these bugs in the SQLXML 3.0 and under? Or am I doing things wrong?
> Thanks for the help,
> Marcus Grant
>
|||Thanks for looking into this.
In hindsight, we shouldn't have assumed that things that work through
query analyzer will also work with a XML template call.
For people interested, we found a work around for the first problem.
Originally we have a constraint on a table for a unique number per day.
We have an algorithm to determine the unique number (two calls at the
same exact time from different threads will generate the same number).
We do a blind insert into a table with the unique number, check for
unique constraint error, and just loop again indefinitely; creating a
unique number and adding to the table until the insertion is
successful.
Our fix is to disregard the number generation algorithm (luckily we
didn't have to conform to it after all), create a table with a
pre-generated list of unique numbers, and upon inserting to the table,
retrieve a non-used generated number and add it into the table. This
ensures that the unique number will only be added one time per day.
The second problem was just a manual testing bug and shouldn't ever
occur in production.
Thanks,
Marcus Grant

Saturday, February 25, 2012

mssql service manager don't start

after a black out mssqlservice doesn't start also if i try to start it manually
it say no errors or alert windows just return to stop status after few second
have an idea?
i don't know much about mssql this program is used only by my main
billing/accountacy program
thank you for your answer
exscuse for my bad english i am italian
Stivi,
I'm not sure that the problem have something to do with this but i think you
can try.
Sometimes happens that the account used with mssqlservice is not well
configured.
Use Services in the administrative tools to see wich account is used to
authenticate mssqlservice. This account must have administrative permissions
in the machine and the password must not expire or be changed by anyone.
after verifying this try to restart the service.
"stivi" wrote:

> after a black out mssqlservice doesn't start also if i try to start it manually
> it say no errors or alert windows just return to stop status after few second
> have an idea?
> i don't know much about mssql this program is used only by my main
> billing/accountacy program
> thank you for your answer
> exscuse for my bad english i am italian
|||Check the application and system event logs to see why the service
isn't starting. If your server didn't have a UPS then the abrupt
shutdown could've damaged files on the hard drive. As a consequence
the service encounters a damaged file and is unable to start.
Hopefully you (or your system administrator) can fix the
problem...otherwise, be prepared to uninstall/reinstall SQL Server
:-(.
On Sat, 26 Nov 2005 03:56:01 -0800, "stivi"
<stivi@.discussions.microsoft.com> wrote:

>after a black out mssqlservice doesn't start also if i try to start it manually
>it say no errors or alert windows just return to stop status after few second
>have an idea?
>i don't know much about mssql this program is used only by my main
>billing/accountacy program
>thank you for your answer
>exscuse for my bad english i am italian

mssql service manager don't start

after a black out mssqlservice doesn't start also if i try to start it manua
lly
it say no errors or alert windows just return to stop status after few secon
d
have an idea?
i don't know much about mssql this program is used only by my main
billing/accountacy program
thank you for your answer
exscuse for my bad english i am italianStivi,
I'm not sure that the problem have something to do with this but i think you
can try.
Sometimes happens that the account used with mssqlservice is not well
configured.
Use Services in the administrative tools to see wich account is used to
authenticate mssqlservice. This account must have administrative permissions
in the machine and the password must not expire or be changed by anyone.
after verifying this try to restart the service.
"stivi" wrote:

> after a black out mssqlservice doesn't start also if i try to start it man
ually
> it say no errors or alert windows just return to stop status after few sec
ond
> have an idea?
> i don't know much about mssql this program is used only by my main
> billing/accountacy program
> thank you for your answer
> exscuse for my bad english i am italian|||Check the application and system event logs to see why the service
isn't starting. If your server didn't have a UPS then the abrupt
shutdown could've damaged files on the hard drive. As a consequence
the service encounters a damaged file and is unable to start.
Hopefully you (or your system administrator) can fix the
problem...otherwise, be prepared to uninstall/reinstall SQL Server
:-(.
On Sat, 26 Nov 2005 03:56:01 -0800, "stivi"
<stivi@.discussions.microsoft.com> wrote:

>after a black out mssqlservice doesn't start also if i try to start it manu
ally
>it say no errors or alert windows just return to stop status after few seco
nd
>have an idea?
>i don't know much about mssql this program is used only by my main
>billing/accountacy program
>thank you for your answer
>exscuse for my bad english i am italian

mssql service manager don't start

after a black out mssqlservice doesn't start also if i try to start it manually
it say no errors or alert windows just return to stop status after few second
have an idea?
i don't know much about mssql this program is used only by my main
billing/accountacy program
thank you for your answer
exscuse for my bad english i am italianStivi,
I'm not sure that the problem have something to do with this but i think you
can try.
Sometimes happens that the account used with mssqlservice is not well
configured.
Use Services in the administrative tools to see wich account is used to
authenticate mssqlservice. This account must have administrative permissions
in the machine and the password must not expire or be changed by anyone.
after verifying this try to restart the service.
"stivi" wrote:
> after a black out mssqlservice doesn't start also if i try to start it manually
> it say no errors or alert windows just return to stop status after few second
> have an idea?
> i don't know much about mssql this program is used only by my main
> billing/accountacy program
> thank you for your answer
> exscuse for my bad english i am italian|||Check the application and system event logs to see why the service
isn't starting. If your server didn't have a UPS then the abrupt
shutdown could've damaged files on the hard drive. As a consequence
the service encounters a damaged file and is unable to start.
Hopefully you (or your system administrator) can fix the
problem...otherwise, be prepared to uninstall/reinstall SQL Server
:-(.
On Sat, 26 Nov 2005 03:56:01 -0800, "stivi"
<stivi@.discussions.microsoft.com> wrote:
>after a black out mssqlservice doesn't start also if i try to start it manually
>it say no errors or alert windows just return to stop status after few second
>have an idea?
>i don't know much about mssql this program is used only by my main
>billing/accountacy program
>thank you for your answer
>exscuse for my bad english i am italian