Showing posts with label client-side. Show all posts
Showing posts with label client-side. Show all posts

Saturday, February 25, 2012

Client-side xml updates and commits

Hi, I've been digging through online docs to see if SQLXML can do what I'm
hoping, and articles say it can, but not how...
My SQL database has regular relational tables, which I'd like to query
through xpath from a C# app, get the data returned to an XmlDocument (or
XPathDocument, but not a DataSet, which I found a sample for), use XPath to
make changes to the XmlDocument, and then commit the changes back to the SQL
tables.
The bottom of this page:
http://blogs.sqlxml.org/bryantlikes/...10/29/200.aspx regarding
Whidbey features, says "XmlAdapter - like SqlDataAdapter, fills an
XPathDocument from SQL Server, updates the changes back to SQL Server using
autogenerated update statements. Very nice!" which sounds like exactly what
I'm looking for, but searching for more information on "XmlAdapter" just
brings up a bunch of FoxPro stuff. Maybe this feature has been renamed in
the almost two years since that blog post - can anyone point me to current
documentation or samples on how to go about this? I can use SQL 2005 if
needed.
Thanks,
Roger
Hi,
This feature of XML adapter which you have been looking for is not available
in SQL server 2005 beta2.
refer to this link for more info.
http://www.aspnetdev.de/ClassReferen...mlAdapter.aspx
Thanks
"Roger W." wrote:

> Hi, I've been digging through online docs to see if SQLXML can do what I'm
> hoping, and articles say it can, but not how...
> My SQL database has regular relational tables, which I'd like to query
> through xpath from a C# app, get the data returned to an XmlDocument (or
> XPathDocument, but not a DataSet, which I found a sample for), use XPath to
> make changes to the XmlDocument, and then commit the changes back to the SQL
> tables.
> The bottom of this page:
> http://blogs.sqlxml.org/bryantlikes/...10/29/200.aspx regarding
> Whidbey features, says "XmlAdapter - like SqlDataAdapter, fills an
> XPathDocument from SQL Server, updates the changes back to SQL Server using
> autogenerated update statements. Very nice!" which sounds like exactly what
> I'm looking for, but searching for more information on "XmlAdapter" just
> brings up a bunch of FoxPro stuff. Maybe this feature has been renamed in
> the almost two years since that blog post - can anyone point me to current
> documentation or samples on how to go about this? I can use SQL 2005 if
> needed.
> Thanks,
> Roger
>
>

client-side SQLXML

I assume from http://technet.microsoft.com/en-us/...y/ms171948.aspx
that it is possible to have the server-side provider be an OLEDB provider
for Oracle
for instance. But I have failed to find any code samples where SQLXML is
used
client-side to query Oracle or any other RDBMS. Does anyone have an example
of this?
Thanks,
Chris
Chris Harrington
Active Interface, LLC.
http://www.activeinterface.comThe client side SQLXML is only built into the SQL Server OLEDB provider so
it won't work against anything except SQL Server.
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
"ChrisHarrington" <charrington-at-activeinterface.com> wrote in message
news:erR04RBwHHA.736@.TK2MSFTNGP06.phx.gbl...
>I assume from http://technet.microsoft.com/en-us/...y/ms171948.aspx
> that it is possible to have the server-side provider be an OLEDB provider
> for Oracle
> for instance. But I have failed to find any code samples where SQLXML is
> used
> client-side to query Oracle or any other RDBMS. Does anyone have an
> example of this?
> Thanks,
> Chris
>
> Chris Harrington
> Active Interface, LLC.
> http://www.activeinterface.com
>|||But the diagram clearly shows SQLXML being used with "other dbms" systems -
did MSFT make an untrue statement with that diagram?
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
news:D40B1CAA-9270-4E94-A151-E14027811B8E@.microsoft.com...
> The client side SQLXML is only built into the SQL Server OLEDB provider so
> it won't work against anything except SQL Server.
> --
> 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
> "ChrisHarrington" <charrington-at-activeinterface.com> wrote in message
> news:erR04RBwHHA.736@.TK2MSFTNGP06.phx.gbl...
>|||Sorry, my bad. We used to block that. I assume you just have to specify
the right OLEDB connection string for your provided. Other than that there
shouldn't be any difference.
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
"ChrisHarrington" <charrington-at-activeinterface.com> wrote in message
news:u6MdKJewHHA.4916@.TK2MSFTNGP04.phx.gbl...
> But the diagram clearly shows SQLXML being used with "other dbms"
> systems - did MSFT make an untrue statement with that diagram?
> "Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
> news:D40B1CAA-9270-4E94-A151-E14027811B8E@.microsoft.com...
>

client-side SQLXML

I assume from http://technet.microsoft.com/en-us/library/ms171948.aspx
that it is possible to have the server-side provider be an OLEDB provider
for Oracle
for instance. But I have failed to find any code samples where SQLXML is
used
client-side to query Oracle or any other RDBMS. Does anyone have an example
of this?
Thanks,
Chris
Chris Harrington
Active Interface, LLC.
http://www.activeinterface.com
The client side SQLXML is only built into the SQL Server OLEDB provider so
it won't work against anything except SQL Server.
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
"ChrisHarrington" <charrington-at-activeinterface.com> wrote in message
news:erR04RBwHHA.736@.TK2MSFTNGP06.phx.gbl...
>I assume from http://technet.microsoft.com/en-us/library/ms171948.aspx
> that it is possible to have the server-side provider be an OLEDB provider
> for Oracle
> for instance. But I have failed to find any code samples where SQLXML is
> used
> client-side to query Oracle or any other RDBMS. Does anyone have an
> example of this?
> Thanks,
> Chris
>
> Chris Harrington
> Active Interface, LLC.
> http://www.activeinterface.com
>
|||But the diagram clearly shows SQLXML being used with "other dbms" systems -
did MSFT make an untrue statement with that diagram?
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
news:D40B1CAA-9270-4E94-A151-E14027811B8E@.microsoft.com...
> The client side SQLXML is only built into the SQL Server OLEDB provider so
> it won't work against anything except SQL Server.
> --
> 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
> "ChrisHarrington" <charrington-at-activeinterface.com> wrote in message
> news:erR04RBwHHA.736@.TK2MSFTNGP06.phx.gbl...
>
|||Sorry, my bad. We used to block that. I assume you just have to specify
the right OLEDB connection string for your provided. Other than that there
shouldn't be any difference.
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
"ChrisHarrington" <charrington-at-activeinterface.com> wrote in message
news:u6MdKJewHHA.4916@.TK2MSFTNGP04.phx.gbl...
> But the diagram clearly shows SQLXML being used with "other dbms"
> systems - did MSFT make an untrue statement with that diagram?
> "Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
> news:D40B1CAA-9270-4E94-A151-E14027811B8E@.microsoft.com...
>

Client-side Redirect problem

Hi there.

I have a database mirroring session running, and both principal and mirror are working fine. But when i unplug the network cable from principal server, creating a failover scenario, the client doesn′t get redirected to the mirror.

I get an error saying: "A transport-level error has ocurred when received results from the server. The specified network name is no longer available."

connection = "Data Source=SISAD;Failover Partner=Projecto-SWS1;Initial Catalog=SIERE;Persist Security Info=True;User ID=sa;Password=testing;Connection Timeout=100";

//this method is called many times by a thread, emulating some request to the server

public static void Inserir(int codAutor)

{

SqlConnection sqlConnection = new SqlConnection(connection);

SqlCommand command = new SqlCommand("insert into Autor values(@.codAutor,'test')", sqlConnection);

command.CommandType = CommandType.Text;

command.Parameters.AddWithValue("@.codAutor", codAutor.ToString());

command.CommandTimeout = 200;

sqlConnection.Open();

command.ExecuteNonQuery();

sqlConnection.Close();

}

I think the error is because the ExecuteNonQuery() method return info about the rows affected on the server. But in this case how can i create a failover scenario with client-side redirect ?

Thanks in advance.

I think i′ve resolved the problem...

The issue here is that connections are separated into pools by connection string, when using ADO.NET connection pooling.

It seems that when failover occurs, the attempts to reconnect to the database are retrieving connections from the pool, and the datasource is still the failed principal and not the new principal.

I deactivated connection pooling, and now the clients are connecting to the mirror when when principal fails.

Can someone give me some feedback about this ? It′s seems that i can′t use connection pooling when using client-side redirect.

|||

Hi RDSC,

I believe your assessment is correct. The logic to failover to the partner server only occurs when a new connection is established. Rather than disabling connection pooling altogether, you can clear this individual pool (I believe that there is a clearpool connection property that you can set) and should see the connections succeed. If you do try this, please let me know how it turns out.

Thanks,

Il-Sung
Program Manager, SQL Server Protocols.

|||

Hi there.

You are allright. In my code i can see if there is a connection error, and than set clearpool property. Next time the connection will try to connect to the new principal. So connection pooling can be used with client side redirect.

There is something you should be aware. If clearpool property is used, the state of the connection changes to "Closed", because connections from the pool are set to be discarded, so if you still want to use that connection, you have to open it again.

Thanks for you help Sung Lee.

Client-side Redirect problem

Hi there.

I have a database mirroring session running, and both principal and mirror are working fine. But when i unplug the network cable from principal server, creating a failover scenario, the client doesn′t get redirected to the mirror.

I get an error saying: "A transport-level error has ocurred when received results from the server. The specified network name is no longer available."

connection = "Data Source=SISAD;Failover Partner=Projecto-SWS1;Initial Catalog=SIERE;Persist Security Info=True;User ID=sa;Password=testing;Connection Timeout=100";

//this method is called many times by a thread, emulating some request to the server

public static void Inserir(int codAutor)

{

SqlConnection sqlConnection = new SqlConnection(connection);

SqlCommand command = new SqlCommand("insert into Autor values(@.codAutor,'test')", sqlConnection);

command.CommandType = CommandType.Text;

command.Parameters.AddWithValue("@.codAutor", codAutor.ToString());

command.CommandTimeout = 200;

sqlConnection.Open();

command.ExecuteNonQuery();

sqlConnection.Close();

}

I think the error is because the ExecuteNonQuery() method return info about the rows affected on the server. But in this case how can i create a failover scenario with client-side redirect ?

Thanks in advance.

I think i′ve resolved the problem...

The issue here is that connections are separated into pools by connection string, when using ADO.NET connection pooling.

It seems that when failover occurs, the attempts to reconnect to the database are retrieving connections from the pool, and the datasource is still the failed principal and not the new principal.

I deactivated connection pooling, and now the clients are connecting to the mirror when when principal fails.

Can someone give me some feedback about this ? It′s seems that i can′t use connection pooling when using client-side redirect.

|||

Hi RDSC,

I believe your assessment is correct. The logic to failover to the partner server only occurs when a new connection is established. Rather than disabling connection pooling altogether, you can clear this individual pool (I believe that there is a clearpool connection property that you can set) and should see the connections succeed. If you do try this, please let me know how it turns out.

Thanks,

Il-Sung
Program Manager, SQL Server Protocols.

|||

Hi there.

You are allright. In my code i can see if there is a connection error, and than set clearpool property. Next time the connection will try to connect to the new principal. So connection pooling can be used with client side redirect.

There is something you should be aware. If clearpool property is used, the state of the connection changes to "Closed", because connections from the pool are set to be discarded, so if you still want to use that connection, you have to open it again.

Thanks for you help Sung Lee.

Client-side programming patterns/idioms for SQL Mobile 2005?

Hello,

Where can I get sample code, or a pointer to sample code demonstrating common programming pattern(s) for a client of SQL Mobile 2005 (where the client is also running on the device)?

For eg, with ADO.NET, I'd do something like:



SqlConnection conn = new SqlConnection(connStr);
SqlCommand cmd = conn.CreateCommand();
conn.CommandText = “--...my query…”;
SqlDataReader reader = conn.ExecuteReader();
// loop and process the data

What are the corresponding APIs and calls that I’d use for a SQL Mobile 2005 application using the latest CF.Net 2.0 ADO.Net APIs (or whatever they’re called)? I could only find a couple of articles on MSDN, both applying to SQLCE 2.0 and not SQL Mobile:

[1]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnroad/html/road05222002.asp
[2]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/ppcdatabase.asp

If this is documented in Books Online, how can I get to it? I couldn’t find it.

Thanks in advance!

-Ravi

The samples are in books on line of SQL Mobile and .NET CF 2
http://www.microsoft.com/sql/editions/sqlmobile/overview.mspx
http://msdn.microsoft.com/mobility/sqlmobile/default.aspx|||Navigating from the above links to get to the information I need is extremely cumbersome. For now, a search on MSDN2 led me to the following page, on which the link [Using Programming Interfaces] is exactly what I was looking for:

http://msdn2.microsoft.com/en-us/library/ms172961

Thanks,
ravi|||

For the benefit of others who may have the same question, I thought I would post some sample code that demonstrates a client connection programming pattern for SQL Mobile clients:


string dbFilePath = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/data.sdf";
string connectionString = string.Format("Data Source = {0};", dbFilePath);
using (SqlCeConnection conn = new SqlCeConnection(connectionString)) {
try {
/* open the connection, get a command */
conn.Open();
SqlCeCommand cmd = conn.CreateCommand();

cmd.CommandText = @."CREATE TABLE myTable(i int primary key)";
cmd.ExecuteNonQuery();
}
catch (Exception e) {
string logMessage = e.Message;
/* logging code goes here */
}
finally {
conn.Close();
}
} // end using


Note that this code is intended for a client application running on a device that is attempting to connect to a SQL Mobile database on the same device.

|||

Ravi Subramanian wrote:


Note that this code is intended for a client application running on a device that is attempting to connect to a SQL Mobile database on the same device.

Can you actually connect to a SQL Mobile db on another device? I thought it always had to be on the same device as your app.
Can anyone confirm this?|||SQL Mobile Client app and the DB should be on the same device except in the following scenarios:
1) SQL Server 2005 Management Studio (running on Desktop) can be used to connect to a SQL Mobile DB on the device
2) VS 2005 Management Studio (running on Desktop) can be used to connect to a SQL Mobile DB on the device

Thanks,
Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

Client-side problem with mirroring

Hi!

I posted this on the adonet forum but didn't get any response so I might as well post it here. Hope anyone can help me.

-

I have set up mirroring and trying to get it to work from my .NET
application. Mirroring seems to work ok.
When I do a manual failover the witness is updated properly in the
sys.database_mirroring_witnesses table so it seems to be configured
correctly. I also can shutdown the master database and the mirror takes over.

My application is configured with Server set to my master database and
FailOverPartner to my mirror database.

If I am connected to the master database and do a manual fail-over all my
attempts to communicate with the database fail with an exception, even after
repeated retries.
(System.Data.SqlClient.SqlException: A transport-level error has occurred
when sending the request to the server. (provider: TCP Provider, error: 0 -
An existing connection was forcibly closed by the remote host.).)

If I do a manual fail-over and restart my application it connects to the
mirror database and everything is working. If I now do a manual fail-over I
get the same exception, but after a few retries it connects to the master
database.

The field Connection.Datasource always shows the master database regardless
if it's connected to the mirror.

What am I doing wrong? Is this how it's supposed to work?

-

I have been pulling my hair over this problem and I just can't get it to work.

I'm using SQL Server Authentication to access the database and I can connect
to the master when it's acting as principal and I can connect to the mirror
when it's acting as principal, but when doing a fail-over, manual or shutting
down the master server it never tries to connect automatically to the mirror
even if it's changed role to principal.

Do the client need access to the witness in any way?

I'm using version 2.0.50727 of System.Data.dll.

I'm wondering if when you say "master database", you are refering to the system database called master or the principal database. It isn't clear. So I am going to assume that you mean "principal" database when you say "master" database, but your comments are very confusing. Also remember that Principal and Mirror are roles, it is better to state Server A and Server B and the role they are currently in. Also, when you say master database, everyone in the world thinks you are refering to the system database called "master," which cannot be mirrored. We'll get it figured out. :)

"My application is configured with Server set to my master database and
FailOverPartner to my mirror database."

You mean Server set to Server A and Failover_Partner is set to Server B, correct? You should not be putting database names in where there should be server names...

"Do the client need access to the witness in any way?"

No.

"I'm using version 2.0.50727 of System.Data.dll."

Can you verify that you are using the same System.data.dll as in this KB? http://support.microsoft.com/kb/912151/

"but after a few retries it connects to the master
database."

By retries, do you mean that the application is processing the network error and issues a reconnect?

Thanks,

Mark

Client-side printing hangs IE

Hi,
When I try to print a report using client-side printing in SP2, I get the
Print dialog fine, then when I click 'OK' I get the 'Printing now...' popup,
but IE hangs instantly. I've tried removing the ActiveX component and
reregistering it but to no avail. However, it works fine on other machines
that we have. Rendering to PDF works fine, so the report itself must be OK.
Is anyone else seeing the same problem, or have any ideas about what could
be causing it?
Thanks,
Chris.I found that being logged in as Administrator works perfectly, so it seems
to be some sort of permissions issue on the server. Do I need to change any
security settings in IIS or folder security on the report server?
Interestingly, the Export feature doesn't work unless the user has
administrative rights on the local machine.
Any ideas?
Chris.
"Chris Childs" <chris@.nospam.nowhere.com> wrote in message
news:d4qc2t$3ni$1$8302bc10@.news.demon.co.uk...
> Hi,
> When I try to print a report using client-side printing in SP2, I get the
> Print dialog fine, then when I click 'OK' I get the 'Printing now...'
> popup, but IE hangs instantly. I've tried removing the ActiveX component
> and reregistering it but to no avail. However, it works fine on other
> machines that we have. Rendering to PDF works fine, so the report itself
> must be OK.
> Is anyone else seeing the same problem, or have any ideas about what could
> be causing it?
> Thanks,
> Chris.
>|||It sounds like a permissions issue. Can you export to Web Archive as a non
admin? Both of these features use the users temp directory for storing some
data, can you see if the users has write permission on his %temp% directory?
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Chris Childs" <chris@.nospam.nowhere.com> wrote in message
news:d4qeda$h40$1$8300dec7@.news.demon.co.uk...
>I found that being logged in as Administrator works perfectly, so it seems
>to be some sort of permissions issue on the server. Do I need to change
>any security settings in IIS or folder security on the report server?
> Interestingly, the Export feature doesn't work unless the user has
> administrative rights on the local machine.
> Any ideas?
> Chris.
> "Chris Childs" <chris@.nospam.nowhere.com> wrote in message
> news:d4qc2t$3ni$1$8302bc10@.news.demon.co.uk...
>> Hi,
>> When I try to print a report using client-side printing in SP2, I get the
>> Print dialog fine, then when I click 'OK' I get the 'Printing now...'
>> popup, but IE hangs instantly. I've tried removing the ActiveX component
>> and reregistering it but to no avail. However, it works fine on other
>> machines that we have. Rendering to PDF works fine, so the report itself
>> must be OK.
>> Is anyone else seeing the same problem, or have any ideas about what
>> could be causing it?
>> Thanks,
>> Chris.
>>
>|||Even when the user has full administrative rights on the local machine,
client-side printing still doesn't work. The user has full access to the
temp directory, and can export to both PDF and Web Archive formats.
Client-side printing only works when the user has administrative rights to
the domain. Maybe it is a setting in IIS, any ideas?
"Daniel Reib (MSFT)" <danreib@.online.microsoft.com> wrote in message
news:OkAdGcDTFHA.2520@.TK2MSFTNGP09.phx.gbl...
> It sounds like a permissions issue. Can you export to Web Archive as a
> non admin? Both of these features use the users temp directory for
> storing some data, can you see if the users has write permission on his
> %temp% directory?
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> "Chris Childs" <chris@.nospam.nowhere.com> wrote in message
> news:d4qeda$h40$1$8300dec7@.news.demon.co.uk...
>>I found that being logged in as Administrator works perfectly, so it seems
>>to be some sort of permissions issue on the server. Do I need to change
>>any security settings in IIS or folder security on the report server?
>> Interestingly, the Export feature doesn't work unless the user has
>> administrative rights on the local machine.
>> Any ideas?
>> Chris.
>> "Chris Childs" <chris@.nospam.nowhere.com> wrote in message
>> news:d4qc2t$3ni$1$8302bc10@.news.demon.co.uk...
>> Hi,
>> When I try to print a report using client-side printing in SP2, I get
>> the Print dialog fine, then when I click 'OK' I get the 'Printing
>> now...' popup, but IE hangs instantly. I've tried removing the ActiveX
>> component and reregistering it but to no avail. However, it works fine
>> on other machines that we have. Rendering to PDF works fine, so the
>> report itself must be OK.
>> Is anyone else seeing the same problem, or have any ideas about what
>> could be causing it?
>> Thanks,
>> Chris.
>>
>>
>|||It is doubtful that it is an IIS setting. Are there any policies that block
ActiveX controls?
--
Brian Welcker
Group Program Manager
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Chris Childs" <chris@.nospam.nowhere.com> wrote in message
news:d4sq3p$od8$1$8302bc10@.news.demon.co.uk...
> Even when the user has full administrative rights on the local machine,
> client-side printing still doesn't work. The user has full access to the
> temp directory, and can export to both PDF and Web Archive formats.
> Client-side printing only works when the user has administrative rights to
> the domain. Maybe it is a setting in IIS, any ideas?
> "Daniel Reib (MSFT)" <danreib@.online.microsoft.com> wrote in message
> news:OkAdGcDTFHA.2520@.TK2MSFTNGP09.phx.gbl...
>> It sounds like a permissions issue. Can you export to Web Archive as a
>> non admin? Both of these features use the users temp directory for
>> storing some data, can you see if the users has write permission on his
>> %temp% directory?
>> --
>> -Daniel
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "Chris Childs" <chris@.nospam.nowhere.com> wrote in message
>> news:d4qeda$h40$1$8300dec7@.news.demon.co.uk...
>>I found that being logged in as Administrator works perfectly, so it
>>seems to be some sort of permissions issue on the server. Do I need to
>>change any security settings in IIS or folder security on the report
>>server?
>> Interestingly, the Export feature doesn't work unless the user has
>> administrative rights on the local machine.
>> Any ideas?
>> Chris.
>> "Chris Childs" <chris@.nospam.nowhere.com> wrote in message
>> news:d4qc2t$3ni$1$8302bc10@.news.demon.co.uk...
>> Hi,
>> When I try to print a report using client-side printing in SP2, I get
>> the Print dialog fine, then when I click 'OK' I get the 'Printing
>> now...' popup, but IE hangs instantly. I've tried removing the ActiveX
>> component and reregistering it but to no avail. However, it works fine
>> on other machines that we have. Rendering to PDF works fine, so the
>> report itself must be OK.
>> Is anyone else seeing the same problem, or have any ideas about what
>> could be causing it?
>> Thanks,
>> Chris.
>>
>>
>>
>|||No, the ActiveX control installs fine, and I get the print dialog, but then
it hangs when I print (or print preview) after that. We have no problems
with other ActiveX controls.
Chris.
"Brian Welcker [MSFT]" <bwelcker@.online.microsoft.com> wrote in message
news:e$CvMMNTFHA.3848@.TK2MSFTNGP10.phx.gbl...
> It is doubtful that it is an IIS setting. Are there any policies that
> block ActiveX controls?
> --
> Brian Welcker
> Group Program Manager
> Microsoft SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> "Chris Childs" <chris@.nospam.nowhere.com> wrote in message
> news:d4sq3p$od8$1$8302bc10@.news.demon.co.uk...
>> Even when the user has full administrative rights on the local machine,
>> client-side printing still doesn't work. The user has full access to the
>> temp directory, and can export to both PDF and Web Archive formats.
>> Client-side printing only works when the user has administrative rights
>> to the domain. Maybe it is a setting in IIS, any ideas?
>> "Daniel Reib (MSFT)" <danreib@.online.microsoft.com> wrote in message
>> news:OkAdGcDTFHA.2520@.TK2MSFTNGP09.phx.gbl...
>> It sounds like a permissions issue. Can you export to Web Archive as a
>> non admin? Both of these features use the users temp directory for
>> storing some data, can you see if the users has write permission on his
>> %temp% directory?
>> --
>> -Daniel
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "Chris Childs" <chris@.nospam.nowhere.com> wrote in message
>> news:d4qeda$h40$1$8300dec7@.news.demon.co.uk...
>>I found that being logged in as Administrator works perfectly, so it
>>seems to be some sort of permissions issue on the server. Do I need to
>>change any security settings in IIS or folder security on the report
>>server?
>> Interestingly, the Export feature doesn't work unless the user has
>> administrative rights on the local machine.
>> Any ideas?
>> Chris.
>> "Chris Childs" <chris@.nospam.nowhere.com> wrote in message
>> news:d4qc2t$3ni$1$8302bc10@.news.demon.co.uk...
>> Hi,
>> When I try to print a report using client-side printing in SP2, I get
>> the Print dialog fine, then when I click 'OK' I get the 'Printing
>> now...' popup, but IE hangs instantly. I've tried removing the
>> ActiveX component and reregistering it but to no avail. However, it
>> works fine on other machines that we have. Rendering to PDF works
>> fine, so the report itself must be OK.
>> Is anyone else seeing the same problem, or have any ideas about what
>> could be causing it?
>> Thanks,
>> Chris.
>>
>>
>>
>>
>|||Try this...I think you may be missing RSClientPrint.Authenticate = false;
function Print()
{
RSClientPrint.MarginLeft = .5 * 25.4;
RSClientPrint.MarginTop = .5 * 25.4;
RSClientPrint.MarginRight = .5 * 25.4;
RSClientPrint.MarginBottom = .5 * 25.4;
RSClientPrint.Culture = 1033;
RSClientPrint.UICulture = 1033;
RSClientPrint.PageWidth = 11 * 25.4;
RSClientPrint.PageHeight = 8.5 * 25.4;
RSClientPrint.Authenticate = false;
RSClientPrint.Print('http://unisys1/reportserver',
'/Test/LMMISInquiry/RECIPIENTREIMBURSEMENT/ReportsAndLetters/AvgTurnaroundTime', 'AvgTurnaroundTime');
}
"Chris Childs" wrote:
> No, the ActiveX control installs fine, and I get the print dialog, but then
> it hangs when I print (or print preview) after that. We have no problems
> with other ActiveX controls.
> Chris.
> "Brian Welcker [MSFT]" <bwelcker@.online.microsoft.com> wrote in message
> news:e$CvMMNTFHA.3848@.TK2MSFTNGP10.phx.gbl...
> > It is doubtful that it is an IIS setting. Are there any policies that
> > block ActiveX controls?
> >
> > --
> > Brian Welcker
> > Group Program Manager
> > Microsoft SQL Server Reporting Services
> >
> > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> >
> > "Chris Childs" <chris@.nospam.nowhere.com> wrote in message
> > news:d4sq3p$od8$1$8302bc10@.news.demon.co.uk...
> >> Even when the user has full administrative rights on the local machine,
> >> client-side printing still doesn't work. The user has full access to the
> >> temp directory, and can export to both PDF and Web Archive formats.
> >> Client-side printing only works when the user has administrative rights
> >> to the domain. Maybe it is a setting in IIS, any ideas?
> >>
> >> "Daniel Reib (MSFT)" <danreib@.online.microsoft.com> wrote in message
> >> news:OkAdGcDTFHA.2520@.TK2MSFTNGP09.phx.gbl...
> >> It sounds like a permissions issue. Can you export to Web Archive as a
> >> non admin? Both of these features use the users temp directory for
> >> storing some data, can you see if the users has write permission on his
> >> %temp% directory?
> >>
> >> --
> >> -Daniel
> >> This posting is provided "AS IS" with no warranties, and confers no
> >> rights.
> >>
> >>
> >> "Chris Childs" <chris@.nospam.nowhere.com> wrote in message
> >> news:d4qeda$h40$1$8300dec7@.news.demon.co.uk...
> >>I found that being logged in as Administrator works perfectly, so it
> >>seems to be some sort of permissions issue on the server. Do I need to
> >>change any security settings in IIS or folder security on the report
> >>server?
> >>
> >> Interestingly, the Export feature doesn't work unless the user has
> >> administrative rights on the local machine.
> >>
> >> Any ideas?
> >>
> >> Chris.
> >>
> >> "Chris Childs" <chris@.nospam.nowhere.com> wrote in message
> >> news:d4qc2t$3ni$1$8302bc10@.news.demon.co.uk...
> >> Hi,
> >>
> >> When I try to print a report using client-side printing in SP2, I get
> >> the Print dialog fine, then when I click 'OK' I get the 'Printing
> >> now...' popup, but IE hangs instantly. I've tried removing the
> >> ActiveX component and reregistering it but to no avail. However, it
> >> works fine on other machines that we have. Rendering to PDF works
> >> fine, so the report itself must be OK.
> >>
> >> Is anyone else seeing the same problem, or have any ideas about what
> >> could be causing it?
> >>
> >> Thanks,
> >>
> >> Chris.
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
>
>

Client-side printing from NT with SP2

We have installed SP2 and client-side printing from the browser is working
fine for our users on XP/IE6. However, we have some users with NT4/IE6 on
their machines. They are able to view reports, but when they click the Print
icon, nothing happens (no error, no prompt, nothing).
Is the ActiveX control for printing included in SP2 supported for clients
using NT4?Ah, crap...
Same here. That's a show stopper!!!
"MELMEL" <MELMEL@.discussions.microsoft.com> wrote in message
news:DDFF5917-13B1-44D2-8138-EB44818B579D@.microsoft.com...
> We have installed SP2 and client-side printing from the browser is working
> fine for our users on XP/IE6. However, we have some users with NT4/IE6 on
> their machines. They are able to view reports, but when they click the
Print
> icon, nothing happens (no error, no prompt, nothing).
> Is the ActiveX control for printing included in SP2 supported for clients
> using NT4?|||When a product is given end of lifetime that really does mean that. It might
work or it might not but MS spends 0 time testing with it. It is not part of
their test suite. Extended support expired almost a year ago. I assume the
users can continute to export to PDF and print that way.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Fredrick Bartlett" <rick_bartlett@.WeDoNET.net> wrote in message
news:Os2pNyPUFHA.3184@.TK2MSFTNGP15.phx.gbl...
> Ah, crap...
> Same here. That's a show stopper!!!
> "MELMEL" <MELMEL@.discussions.microsoft.com> wrote in message
> news:DDFF5917-13B1-44D2-8138-EB44818B579D@.microsoft.com...
> > We have installed SP2 and client-side printing from the browser is
working
> > fine for our users on XP/IE6. However, we have some users with NT4/IE6
on
> > their machines. They are able to view reports, but when they click the
> Print
> > icon, nothing happens (no error, no prompt, nothing).
> >
> > Is the ActiveX control for printing included in SP2 supported for
clients
> > using NT4?
>|||We didn't test on NT4. We tested on XP, Win 2003, Win 2000, Win 98 and
WinME.
--
Brian Welcker
Group Program Manager
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:O8w1aIYUFHA.580@.TK2MSFTNGP15.phx.gbl...
> When a product is given end of lifetime that really does mean that. It
> might
> work or it might not but MS spends 0 time testing with it. It is not part
> of
> their test suite. Extended support expired almost a year ago. I assume the
> users can continute to export to PDF and print that way.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "Fredrick Bartlett" <rick_bartlett@.WeDoNET.net> wrote in message
> news:Os2pNyPUFHA.3184@.TK2MSFTNGP15.phx.gbl...
>> Ah, crap...
>> Same here. That's a show stopper!!!
>> "MELMEL" <MELMEL@.discussions.microsoft.com> wrote in message
>> news:DDFF5917-13B1-44D2-8138-EB44818B579D@.microsoft.com...
>> > We have installed SP2 and client-side printing from the browser is
> working
>> > fine for our users on XP/IE6. However, we have some users with NT4/IE6
> on
>> > their machines. They are able to view reports, but when they click the
>> Print
>> > icon, nothing happens (no error, no prompt, nothing).
>> >
>> > Is the ActiveX control for printing included in SP2 supported for
> clients
>> > using NT4?
>>
>

Friday, February 24, 2012

Client-side Printing and page hesitation

When printing reports from my normal computer to my default printer, all but
one report print without any hesitation between pages. My boss prints
reports and gets a lot of hesitation between pages for most of the reports.
If I print to a differnt printer I too get a lot of hesitation betwen pages.
Does SRS print pages as graphics or as text? Are there any settings on the
server that can alter printing performance? Anyone else having issues with
print hesitation and found a solution to the problem?When u want 2 controll the print properties u should set them at the Report
Properties->layout.
All properties in this tab are 4 the print setting.
"Rob 'Spike' Stevens" wrote:
> When printing reports from my normal computer to my default printer, all but
> one report print without any hesitation between pages. My boss prints
> reports and gets a lot of hesitation between pages for most of the reports.
> If I print to a differnt printer I too get a lot of hesitation betwen pages.
> Does SRS print pages as graphics or as text? Are there any settings on the
> server that can alter printing performance? Anyone else having issues with
> print hesitation and found a solution to the problem?

Client-side or server-side XML support?

What are the advantages/disadvantages of using either
client programming support in SQL server (referred to as
SQLXML) or server-side support - especially when
extracting formatted information from SQL server into a
C# web service? Which one is faster? What type of support
should be used in what circumtances, e.g. when IIS and
SQL server run on the same machine, when extracted
information is more/less voluminous?
Thanks in advance.
Jens
If you are talking about extracting information from the database only, then
using ADO/ADO.net with FOR XML is normally slightly better in performance,
since the XPath against annotated schema is using FOR XML under the covers
as well, but has the translation overhead (assuming that you have the same
query).
So it becomes more of a difference of the programming model and whether you
also load data (in which case for example the SQLXML XML Bulkload object
provides better performance than OpenXML).
Best regards
Michael
"Jens Doss" <jens.dosse@.oecd.org> wrote in message
news:1ef101c4f801$858247a0$a301280a@.phx.gbl...
> What are the advantages/disadvantages of using either
> client programming support in SQL server (referred to as
> SQLXML) or server-side support - especially when
> extracting formatted information from SQL server into a
> C# web service? Which one is faster? What type of support
> should be used in what circumtances, e.g. when IIS and
> SQL server run on the same machine, when extracted
> information is more/less voluminous?
> Thanks in advance.
> Jens

Client-side or server-side XML support?

What are the advantages/divantages of using either
client programming support in SQL server (referred to as
SQLXML) or server-side support - especially when
extracting formatted information from SQL server into a
C# web service? Which one is faster? What type of support
should be used in what circumtances, e.g. when IIS and
SQL server run on the same machine, when extracted
information is more/less voluminous?
Thanks in advance.
JensIf you are talking about extracting information from the database only, then
using ADO/ADO.net with FOR XML is normally slightly better in performance,
since the XPath against annotated schema is using FOR XML under the covers
as well, but has the translation overhead (assuming that you have the same
query).
So it becomes more of a difference of the programming model and whether you
also load data (in which case for example the SQLXML XML Bulkload object
provides better performance than OpenXML).
Best regards
Michael
"Jens Doss" <jens.dosse@.oecd.org> wrote in message
news:1ef101c4f801$858247a0$a301280a@.phx.gbl...
> What are the advantages/divantages of using either
> client programming support in SQL server (referred to as
> SQLXML) or server-side support - especially when
> extracting formatted information from SQL server into a
> C# web service? Which one is faster? What type of support
> should be used in what circumtances, e.g. when IIS and
> SQL server run on the same machine, when extracted
> information is more/less voluminous?
> Thanks in advance.
> Jens

Client-Side Database Mirroring Details

Hi,
I've been tasked with investigating different methods of achieving database
redundancy.
In doing so, I'm currently in the process of writing a test application to
prove that Database Mirroring in SQL Server 2005 is a suitable solution.
Of the established requirements I'm finding difficulties with the following:
1. Identifying the name/instance of SQL Server my application is currently
connected to.
2. Identifying the name/instance of SQL Server cached as the failover
partner, and confirming it state at any time.
3. Identifying the name/instance of SQL Server cached as the witness, and
confirming it state at any time.
4. Forcing a failover via my test application.
I've already got some of this functionality via sp_dbmmonitorresults, but
this relies on the Server Agent running and also adds to the network traffic
.
I was hoping for a solution using calls to the SQL Native Client.
I’m using SQL Server 2005 Enterprise Edition SP1.
My application is written in Visual C++ 6 as is the product this is intended
for.
Also, if anyone knows of any good links to web pages or forum topics with
regards to methods of implementing database retry/reconnect client-side when
SQL Server fails over, I would be grateful. I’ve implemented this
functionality already by deriving my own version of CDatabase, but I’m ope
n
to new suggestions.
Thanks!I haven't really worked on it, But this link seemed interesting..
http://blogs.msdn.com/sqltips/archi..._Mirroring.aspx
-Omnibuzz (The SQL GC)
http://omnibuzz-sql.blogspot.com/|||There is some useful information and one or two scripts, but it doesn’t
really answer my question.
"Omnibuzz" wrote:

> I haven't really worked on it, But this link seemed interesting..
> http://blogs.msdn.com/sqltips/archi..._Mirroring.aspx
> --
> -Omnibuzz (The SQL GC)
> http://omnibuzz-sql.blogspot.com/
>|||As I had said, I hadn't really worked on it.. I guess we will have to wait
for reply from someone else
-Omnibuzz (The SQL GC)
http://omnibuzz-sql.blogspot.com/

Client-Side Database Mirroring Details

Hi,
I've been tasked with investigating different methods of achieving database
redundancy.
In doing so, I'm currently in the process of writing a test application to
prove that Database Mirroring in SQL Server 2005 is a suitable solution.
Of the established requirements I'm finding difficulties with the following:
1. Identifying the name/instance of SQL Server my application is
currently connected to.
2. Identifying the name/instance of SQL Server cached as the
failover partner, and confirming it state at any time.
3. Identifying the name/instance of SQL Server cached as the
witness, and confirming it state at any time.
4. Forcing a failover via my test application.
I've already got some of this functionality via sp_dbmmonitorresults, but
this relies on the Server Agent running and also adds to the network traffic
.
I was hoping for a solution using calls to the SQL Native Client.
I’m using SQL Server 2005 Enterprise Edition SP1.
My application is written in Visual C++ 6 as is the product this is intended
for.
Also, if anyone knows of any good links to web pages or forum topics with
regards to methods of implementing database retry/reconnect client-side when
SQL Server fails over, I would be grateful. I’ve implemented this
functionality already by deriving my own version of CDatabase, but I’m ope
n
to new suggestions.
Thanks!On Thu, 27 Jul 2006 05:43:03 -0700, GMouzourou wrote:

>Hi,
>I've been tasked with investigating different methods of achieving database
>redundancy.
>In doing so, I'm currently in the process of writing a test application to
>prove that Database Mirroring in SQL Server 2005 is a suitable solution.
>Of the established requirements I'm finding difficulties with the following
:
> 1. Identifying the name/instance of SQL Server my application is
> currently connected to.
> 2. Identifying the name/instance of SQL Server cached as the
> failover partner, and confirming it state at any time.
> 3. Identifying the name/instance of SQL Server cached as the
> witness, and confirming it state at any time.
> 4. Forcing a failover via my test application.
>I've already got some of this functionality via sp_dbmmonitorresults, but
>this relies on the Server Agent running and also adds to the network traffi
c.
>I was hoping for a solution using calls to the SQL Native Client.
Hi GMouzourou,
For the first three questions, have you looked at the system management
views? More precisely, the column mirroring_role_desc in sys.databases,
and all of the columns in sys.database_mirroring and
sys.database_mirroring_witness.
For the last question, you can manually force a failover with the
command
ALTER DATABASE dbname SET PARTNER FAILOVER;
If you want to test automatic failover, try shutting down the server:
SHUTDOWN WITH NOWAIT;
Hugo Kornelis, SQL Server MVP

Sunday, February 19, 2012

Client Side Printing

We just installed SP2 on our SRS server. However, the client-side printing
is returning an error. How can we disable this feature?You can do that by deactivating the function with a property called
EnableClientPrintControl. Due to untested I refer only to that post:
http://groups.google.de/group/microsoft.public.sqlserver.reportingsvcs/browse_frm/thread/9bf4cd750acf0237/d6cb4e15cb1b7d57?q=disable+print+OR+printing+Control&rnum=1&hl=de#d6cb4e15cb1b7d57
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"TechnoSpyke" <technospyke@.yahoo.com> schrieb im Newsbeitrag
news:eJFeS$gWFHA.3540@.TK2MSFTNGP15.phx.gbl...
> We just installed SP2 on our SRS server. However, the client-side
> printing is returning an error. How can we disable this feature?
>|||Ok, the error was due to an older control (downloaded the beta version).
After removing that, and downloading a new one, the error is gone.
Still, I dont know where to enable/disable client-side printing. The SP2
document says there is a new Report Server system property called
EnableClientPrinting with a default value as True. I don't see this
property on any of the config files for ReportServer. Where will I change
this?
TIA.
Marlon
"TechnoSpyke" <technospyke@.yahoo.com> wrote in message
news:eJFeS$gWFHA.3540@.TK2MSFTNGP15.phx.gbl...
> We just installed SP2 on our SRS server. However, the client-side
> printing is returning an error. How can we disable this feature?
>|||Found this on the support articles: How to disable client-side printing
http://support.microsoft.com/kb/897121/
Works, but, I was surprised I had to write a little console app to set RS
system properties. Adding/changing config settings would have been more
convenient.
Marlon
"TechnoSpyke" <technospyke@.yahoo.com> wrote in message
news:eZQnjWhWFHA.3620@.TK2MSFTNGP09.phx.gbl...
> Ok, the error was due to an older control (downloaded the beta version).
> After removing that, and downloading a new one, the error is gone.
> Still, I dont know where to enable/disable client-side printing. The SP2
> document says there is a new Report Server system property called
> EnableClientPrinting with a default value as True. I don't see this
> property on any of the config files for ReportServer. Where will I change
> this?
> TIA.
> Marlon
> "TechnoSpyke" <technospyke@.yahoo.com> wrote in message
> news:eJFeS$gWFHA.3540@.TK2MSFTNGP15.phx.gbl...
>> We just installed SP2 on our SRS server. However, the client-side
>> printing is returning an error. How can we disable this feature?
>

Client Side Printing

Ok, for the life of me I can't seem to get this to work. Whenever I used the client-side print for SRS2000 SP2 it will always print out a blank page at the end.

At first I thought it was the margins, because not matter what I did the right-most column would always get chopped off. It would preview and look great, but as soon as I printed the page the last column would be chopped in half and print on a separate page.

So to troubleshoot I created a table that had only one column that was placed in the center of the page (using padding). Event after doing this the column STILL got chopped in half and printed out in two pages. Yet previewed and looked like it would print out ok.

Any help would be greatly appreciated. This one is driving me crazy.

Ok scratch this one. Turns out I wasn't accounting for the margins that were being set somewere. Once I reduced the body and table width by .1 inch then the right hand column isn't chopped and the correct number of pages prints out (no blanks).

There report has no margin and when printing I was sure to set the margins to 0 there as well.

Anyone tell me where this margin is coming from? Is this printer specific?

Thanks

|||

Have you tried to go to REPORT PROPERTIES for the specific report?

and establish the width in CM or inches?

Did you also look at report headers and footers

How large is your "print frame"

Are you using RS 2000 or RS 2005?

Can Help u!

|||

RS 2000.

The body of the report is 8.5" x 11". In the report properties->layout the page width is also 8.5" x 11". In the same section all margins are set to 0. My table is the entire width of the body (i.e. also 8.5" wide).

Now when I print the report using the Active X client side print component there is a margin added to the report that I hadn't accounted for. This margin was chopping the right column off and having it print on a separate page. This margin exists even though no margins are set for the report and when printing there are no margins set there as well.

What had been confusing me was that no matter how wide I made the table it still printed two pages. What I didn't realize is that I had to reduce the width of the body as well.

So by setting the width of the body to 8.45" and the width of the table to the same 8.45" the report prints on one page as expected.

Now, that we are on the same page, where did this margin come from knowing that I did not set it anywhere? The printer, RS2000, the client side Active X control...?

Thanks

|||

Hi,
I rather experience a very peculiar problem. I have developed a page in asp.net, which has a Print button by itself. It has to take the user to the printer window (I have used window.print()). When the user selects the printer and says print the first and the third page ( third page being the last page) gets printed properly where as the second page will have problems with the right side margin. This page is getting created on the run depending on the user's inputs. When I view the print preview, I found that the text in the next line of the page also comes to the previous page resulting in the loss of datain the II page content alone.

For example,

In the actual page, if I have

When a page from the web is printed, sometimes the right
hand side centremeter will be cut off.
Microsoft has a knowledge base article about this problem:

The text in the print preview would be,

When a page from the web is printed, sometimes the right hand side centremeter will be cut off. Microsoft has a
knowledge base article about this problem:

therefore resulting in the loss of data. I have tried adjusting the right and left side margins, but without luck.

This happens even if i print it with/without back to back option.
Even if i ask for the II page alone to be printed twice instead of the whole web page content, both the pages have the right side margin lost.

The same content that appears in the II page if made to appear in the III page does not affect the right margin of the III page. Thus, it does not have any content related issues.

Printing with landscape option wont be a reasonable option for the user. So, that can be ruled out.

Please advise what could be the work around at teh earliest as i have to get back to the user.