Showing posts with label web. Show all posts
Showing posts with label web. Show all posts

Monday, March 26, 2012

Opening Report Server 2005 web site with VS 2005

I'm getting the "Report Server has not been congured for use with ASP.NET
2.0" when I open the report server web site using VS 2005. This is on
Windows 2003 and the SSRS 2005. Any idea how I can resolve this?
Thanks,
GilgameshWhat do you mean by this? You don't open up a report server web site in VS.
There is no way to do that. Do you mean you open up a project that has
reports? Or that you try to deploy to the server. You never directly touch
RS website. You install it, you deploy to it. You open up the portal. But
you never open up in VS.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Gilgamesh" <gilgamesh4ever@.aol.com> wrote in message
news:OEtDx9P4HHA.4712@.TK2MSFTNGP04.phx.gbl...
> I'm getting the "Report Server has not been congured for use with ASP.NET
> 2.0" when I open the report server web site using VS 2005. This is on
> Windows 2003 and the SSRS 2005. Any idea how I can resolve this?
> Thanks,
> Gilgamesh
>|||Well, report server is an asp.net applciation, and I was able to open the
web site using VS 2005. I'm working on the security extension which reuires
making changes to the logon.aspx page, and also I would need to create a new
aspx page and add the report viewer to it. The problem is that I can't even
open the site successuly.
-G
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:ewScpJQ4HHA.4476@.TK2MSFTNGP06.phx.gbl...
> What do you mean by this? You don't open up a report server web site in
> VS. There is no way to do that. Do you mean you open up a project that has
> reports? Or that you try to deploy to the server. You never directly touch
> RS website. You install it, you deploy to it. You open up the portal. But
> you never open up in VS.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Gilgamesh" <gilgamesh4ever@.aol.com> wrote in message
> news:OEtDx9P4HHA.4712@.TK2MSFTNGP04.phx.gbl...
>> I'm getting the "Report Server has not been congured for use with ASP.NET
>> 2.0" when I open the report server web site using VS 2005. This is on
>> Windows 2003 and the SSRS 2005. Any idea how I can resolve this?
>> Thanks,
>> Gilgamesh
>|||I have not implemented forms security (which is what I assume you are doing)
but reading up on it, it does not seem to me you are modifying anything
other than config files for RS. Yes RS is an asp.net application but I am
pretty sure that you do not modify it directly. You create your own asp.net
application that has your logon form and you modify config files with RS
2005.
Now on the off chance I am completely wrong about this and the reality is
that you do have to do as you are suggesting, are you sure this is RS 2005?
RS 2000 is a 1.1 framework application rather than a 2.0 framework app like
RS 2005.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Gilgamesh" <gilgamesh4ever@.aol.com> wrote in message
news:OjzehOQ4HHA.3684@.TK2MSFTNGP02.phx.gbl...
> Well, report server is an asp.net applciation, and I was able to open the
> web site using VS 2005. I'm working on the security extension which
> reuires making changes to the logon.aspx page, and also I would need to
> create a new aspx page and add the report viewer to it. The problem is
> that I can't even open the site successuly.
> -G
>
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:ewScpJQ4HHA.4476@.TK2MSFTNGP06.phx.gbl...
>> What do you mean by this? You don't open up a report server web site in
>> VS. There is no way to do that. Do you mean you open up a project that
>> has reports? Or that you try to deploy to the server. You never directly
>> touch RS website. You install it, you deploy to it. You open up the
>> portal. But you never open up in VS.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Gilgamesh" <gilgamesh4ever@.aol.com> wrote in message
>> news:OEtDx9P4HHA.4712@.TK2MSFTNGP04.phx.gbl...
>> I'm getting the "Report Server has not been congured for use with
>> ASP.NET 2.0" when I open the report server web site using VS 2005. This
>> is on Windows 2003 and the SSRS 2005. Any idea how I can resolve this?
>> Thanks,
>> Gilgamesh
>>
>

Friday, March 23, 2012

OPEN XML vs. SQLXMLBulkLoad

Which approach is a faster, better solution to process XML data? I get XML
data from an external web service. To ballpark the general size, an average
data file would be approximately 64K when saved in UTF-8.
A) TEXT parameter/sp_xml_preparedocument/OPENXML
- Passing raw XML as a TEXT parameter into a stored procedure
- sp_xml_preparedocument to parse the XML into an XML handle.
- Process the data using T-SQL with OPENXML
B) SQLXMLBULKLOAD/staging table/stored procedure
- Save the XML to a flat file
- Use the COM object SQLXMLBULKLOAD to bulk load the XML into a staging
table.
- Call a stored procedure which processes the data in the staging table
using T-SQL.
Any insight into this would be greatly appreciated.I prefer option B. This allows me to bulkload (i.e. minimal log) and then
use tsql to do whatever data insert in set. Also, this allows me to hand of
some of the workload to the client (i.e. workstation that does xmlbulkload).
-oj
"AsaMonsey" <AsaMonsey@.discussions.microsoft.com> wrote in message
news:A44A0EB0-2C15-4477-8FD3-93C7379CF9E0@.microsoft.com...
> Which approach is a faster, better solution to process XML data? I get XML
> data from an external web service. To ballpark the general size, an
> average
> data file would be approximately 64K when saved in UTF-8.
> A) TEXT parameter/sp_xml_preparedocument/OPENXML
> - Passing raw XML as a TEXT parameter into a stored procedure
> - sp_xml_preparedocument to parse the XML into an XML handle.
> - Process the data using T-SQL with OPENXML
> B) SQLXMLBULKLOAD/staging table/stored procedure
> - Save the XML to a flat file
> - Use the COM object SQLXMLBULKLOAD to bulk load the XML into a staging
> table.
> - Call a stored procedure which processes the data in the staging table
> using T-SQL.
>
> Any insight into this would be greatly appreciated.|||Thanks oj,
Our performance benchmarking across 1000 files indicates that the bulk load
is about 60% faster.
I was wondering if someone could explain the technical reasons why option B
is faster.
"oj" wrote:

> I prefer option B. This allows me to bulkload (i.e. minimal log) and then
> use tsql to do whatever data insert in set. Also, this allows me to hand o
f
> some of the workload to the client (i.e. workstation that does xmlbulkload
).
> --
> -oj
>
> "AsaMonsey" <AsaMonsey@.discussions.microsoft.com> wrote in message
> news:A44A0EB0-2C15-4477-8FD3-93C7379CF9E0@.microsoft.com...
>
>|||This article should help explain some:
[url]http://msdn.microsoft.com/library/en-us/dnsql90/html/exchsqlxml.asp?frame=true[/ur
l]
<quote>
SQLXML Bulkload enables the loading of input XML into the relational
backend. Internally, it uses the SQL Server bcp process, and is the best
mechanism to efficiently upload large input XML into the server. It is
implemented as a COM object, and it uses SQLOLEDB providers.
</quote>
-oj
"AsaMonsey" <AsaMonsey@.discussions.microsoft.com> wrote in message
news:F989E8E7-9B24-482F-AC85-7D848D028D08@.microsoft.com...
> Thanks oj,
> Our performance benchmarking across 1000 files indicates that the bulk
> load
> is about 60% faster.
> I was wondering if someone could explain the technical reasons why option
> B
> is faster.
> "oj" wrote:
>

Wednesday, March 21, 2012

Open up new window for external URL

I'm trying to use "Jump to URL" to link the report to external web site.
However, I find that there's no way to open up a new window. It seems
inconvenient for user to close the report whenever external link is clicked.
Does anyone have idea to resolve this?use target=_blank
"Edmond Lee" wrote:
> I'm trying to use "Jump to URL" to link the report to external web site.
> However, I find that there's no way to open up a new window. It seems
> inconvenient for user to close the report whenever external link is clicked.
> Does anyone have idea to resolve this?
>|||yuanxm, Thank you for your reply.
However, I had tried several time to type "target=_blank" together with URL
for "Jump to URL" insides Navigation tab and error was resulted.
Is there any trick required?
"yuanxm" wrote:
> use target=_blank
> "Edmond Lee" wrote:
> > I'm trying to use "Jump to URL" to link the report to external web site.
> > However, I find that there's no way to open up a new window. It seems
> > inconvenient for user to close the report whenever external link is clicked.
> >
> > Does anyone have idea to resolve this?
> >|||I have not personally needed to do this so I don't know from experience but
my feeling is that the solution here is where you are in another webpage
(not Reporting Services) and want to have this happen. Not when it is using
the jump to url. What you can do (and this is something I just learned this
week) is to use the ability with SP1 to use javascript. For you jump to URL
put in the following expression:
="javascript:void(window.open('http://www.google.com'))"
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Edmond Lee" <EdmondLee@.discussions.microsoft.com> wrote in message
news:2ED75DC0-C379-4E9A-A0E1-565B3D9DC746@.microsoft.com...
> yuanxm, Thank you for your reply.
> However, I had tried several time to type "target=_blank" together with
> URL
> for "Jump to URL" insides Navigation tab and error was resulted.
> Is there any trick required?
> "yuanxm" wrote:
>> use target=_blank
>> "Edmond Lee" wrote:
>> > I'm trying to use "Jump to URL" to link the report to external web
>> > site.
>> > However, I find that there's no way to open up a new window. It seems
>> > inconvenient for user to close the report whenever external link is
>> > clicked.
>> >
>> > Does anyone have idea to resolve this?
>> >|||This works only on the reportserver, i.e. when i view reports
http://servername/reportserver/... but the java scrip doesnt work when i view
reports on the report manager like this http://servername/reports/..
Plz suggest somethng
"Bruce L-C [MVP]" wrote:
> I have not personally needed to do this so I don't know from experience but
> my feeling is that the solution here is where you are in another webpage
> (not Reporting Services) and want to have this happen. Not when it is using
> the jump to url. What you can do (and this is something I just learned this
> week) is to use the ability with SP1 to use javascript. For you jump to URL
> put in the following expression:
> ="javascript:void(window.open('http://www.google.com'))"
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Edmond Lee" <EdmondLee@.discussions.microsoft.com> wrote in message
> news:2ED75DC0-C379-4E9A-A0E1-565B3D9DC746@.microsoft.com...
> > yuanxm, Thank you for your reply.
> >
> > However, I had tried several time to type "target=_blank" together with
> > URL
> > for "Jump to URL" insides Navigation tab and error was resulted.
> > Is there any trick required?
> >
> > "yuanxm" wrote:
> >
> >> use target=_blank
> >>
> >> "Edmond Lee" wrote:
> >>
> >> > I'm trying to use "Jump to URL" to link the report to external web
> >> > site.
> >> > However, I find that there's no way to open up a new window. It seems
> >> > inconvenient for user to close the report whenever external link is
> >> > clicked.
> >> >
> >> > Does anyone have idea to resolve this?
> >> >
>
>|||When I tried opening it on report manager, it opened 2 windows. One was
google and the other one had the
javascript:void(window.open('http://www.google.com')) on the address bar. It
was interesting!!
"NI" wrote:
> This works only on the reportserver, i.e. when i view reports
> http://servername/reportserver/... but the java scrip doesnt work when i view
> reports on the report manager like this http://servername/reports/..
> Plz suggest somethng
>
> "Bruce L-C [MVP]" wrote:
> > I have not personally needed to do this so I don't know from experience but
> > my feeling is that the solution here is where you are in another webpage
> > (not Reporting Services) and want to have this happen. Not when it is using
> > the jump to url. What you can do (and this is something I just learned this
> > week) is to use the ability with SP1 to use javascript. For you jump to URL
> > put in the following expression:
> >
> > ="javascript:void(window.open('http://www.google.com'))"
> >
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> > "Edmond Lee" <EdmondLee@.discussions.microsoft.com> wrote in message
> > news:2ED75DC0-C379-4E9A-A0E1-565B3D9DC746@.microsoft.com...
> > > yuanxm, Thank you for your reply.
> > >
> > > However, I had tried several time to type "target=_blank" together with
> > > URL
> > > for "Jump to URL" insides Navigation tab and error was resulted.
> > > Is there any trick required?
> > >
> > > "yuanxm" wrote:
> > >
> > >> use target=_blank
> > >>
> > >> "Edmond Lee" wrote:
> > >>
> > >> > I'm trying to use "Jump to URL" to link the report to external web
> > >> > site.
> > >> > However, I find that there's no way to open up a new window. It seems
> > >> > inconvenient for user to close the report whenever external link is
> > >> > clicked.
> > >> >
> > >> > Does anyone have idea to resolve this?
> > >> >
> >
> >
> >

Open SqlCeConnection from an ASP.NET Web Service?

Help!

I am trying to implement a web service that creates and populates a SQL Mobile database file, then returns the created database to a mobile device as a byte array. The database size could be in excess of 500,000 rows, which is why I want to do as much of this preprocessing on the server before it gets to the mobile device. I can't use replication since I have to do some shaping of the data before I can use it on the mobile device.

Unfortunately, the web service is throwing the following exception when I try to instantiate a SqlCeConnection object:

"System.NotSupportedException: SQL Server Everywhere Edition is not intended for ASP.NET development."

Are there any suggestions as to how I can get around this potential limitation? If I refactor out the code that actually performs the SqlCe operations to a separate assembly, but still call that assembly from within the ASP.NET process, will I get the same error?

I know that you can work with Sql Mobile databases from the deskop, and I suppose I could invoke a console application to create the database, but that seems like such a hack.

Thanks for any advice,

Matthew

This limitation was built into the SQL Everywhere engine because it is supposed to be used as an embedded database (running in-proc with your application), and not in a client-server scenario. The engine will actually test if there are any IIS processes in the calling stack (not sure about the terminology here), so you are out of luck.

Maybe someone smarter than me has a solution - I would also love to know it.

|||

I can understand the reasoning behind that decision; SQL Express is positioned perfectly for that case, but I am definitely not trying to use the SQL Everywhere engine in a client/server scenario.

I am just trying to let a server with significantly more resources pre-build a database for use on a mobile device, then ship the database down to the client. I'd hate to have to write some process that I can "shell" out to from the web app, generate the .sdf file, then read it in by the web service, but I really don't want to if I don't have to. Replication is not really an option, unfortunately.

Thanks,

Matthew

Tuesday, March 20, 2012

Open PDF in Web Browser

Hi,
I've got a report that I invoke from within Javascript using a direct
URL hit to the report. When the report generates it asks to either
"Open" or "Save" the PDF file. When I click on Open it opens Acrobat
Reader to view the file.
I need the report to open within the same browser as the javascript
that kicked it off without any prompts.
Is this possible in Reporting Services?
Regards,
Graham Richter.Hi
Are you wanting it still to be pdf and just open with the plugin? Or
otherwise render it as html.

Open or Download a file in Sql Reports Resources using Report Service API

Using the reporting service web service to get the file path for a reports and the report viewer control on a Web page, it is possible to view reports. This works fine. I built a tree view that shows the reports. I also show resource files ( like .xls or .doc files ) that a user may have uploaded to the report directory. I show these filenames in the treeview as well as actual sql reports. If the user clicks on a report name, I set the path in the report viewer control and the report is rendered.

Now I would also like the user to be able to download or open any xls or doc file that may also be in the report directory from this web application.

Is this possible?

Normally in the Report Manager it uses Resources.aspx to download or open the file.

Is there any way to access these files programatically?

thanks

-Barb

Okay I found the answer, it is using the Report Web ServicegetResourceContents()

-Barb

Monday, March 19, 2012

Open late close early

I'm porting a web based MS Access app (ASP) to MS SQL Server. With Access,
since it isn't multi-user, I always opened the database late and closed it
early in the code. Should I do the same thing with SQL Server or is it OK
to open/close the database at the HTTP session start/end? There will be
about 50 or so concurrent users. Thanks in advance.
It's still recommended that you "open late" / "close early" if you're using
any kind of pooled connection library. That way, connections will be able
to stay in the pool as long as possible.
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
"Bob Smith" <noemail@.please.com> wrote in message
news:mCrkd.5370$z3.2192@.bignews5.bellsouth.net...
> I'm porting a web based MS Access app (ASP) to MS SQL Server. With
Access,
> since it isn't multi-user, I always opened the database late and closed it
> early in the code. Should I do the same thing with SQL Server or is it OK
> to open/close the database at the HTTP session start/end? There will be
> about 50 or so concurrent users. Thanks in advance.
>
|||"Bob Smith" <noemail@.please.com> wrote in message
news:mCrkd.5370$z3.2192@.bignews5.bellsouth.net...
> I'm porting a web based MS Access app (ASP) to MS SQL Server. With
Access,
> since it isn't multi-user, I always opened the database late and closed it
> early in the code. Should I do the same thing with SQL Server or is it OK
> to open/close the database at the HTTP session start/end? There will be
> about 50 or so concurrent users. Thanks in advance.
You don't really have the concept of "open" and "closing" a database in SQL
Server, but in general, you want to keep your actual work with the server
short and sweet. Keeping this attitude will help you avoid unnecessarily
prolonged transactions, blocking, etc.

>
|||Hi Bob,
Thanks for your post and thanks for Adam and Greg's
input.
"Open late, close early" is a good practice as this
frees resources while other logic is processing. I
suggest that you refer to this article for more
information:
258939 Recommendations for Connecting to Databases
Through Internet Information
http://support.microsoft.com/?id=258939
If you have any further questions or concerns please
feel free to let us know.
Sincerely,
William Wang
Microsoft Online Partner Support
Get Secure! - <www.microsoft.com/security>
================================================== ===
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
================================================== ===
This posting is provided "AS IS" with no warranties, and
confers no rights.
--
>From: "Bob Smith" <noemail@.please.com>
>Newsgroups: microsoft.public.sqlserver.server
>Subject: Open late close early
>Lines: 7
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
>Message-ID: <mCrkd.5370$z3.2192@.bignews5.bellsouth.net>
>X-Complaints-To: abuse@.bellsouth.net
>X-Abuse-Info: Please forward a copy of all headers for
proper handling
>X-Trace:
ldjgbllpbapjglppdbdpiflmbcekedmfhojhikkbagflhcbong abknppn
iiihliedillphahkfobdkeobjmjdcnmpcaoablghiflhmddnii fjhbmkd
mkllegdncmpbddgkbmehoimepnghmlnnpbhhjapgcojabh
>NNTP-Posting-Date: Wed, 10 Nov 2004 11:47:14 EST
>Organization: BellSouth Internet Group
>Date: Wed, 10 Nov 2004 11:49:37 -0500
>Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado .fastwe
bnet.it!tiscali!newsfeed1.ip.tiscali.net!news.glor b.com!b
igfeed.bellsouth.net!bignumber.bellsouth.net!news. bellsou
th.net!bignews5.bellsouth.net.POSTED!1ec21f86!not-for-mai
l
>Xref: cpmsftngxa10.phx.gbl
microsoft.public.sqlserver.server:366921
>X-Tomcat-NG: microsoft.public.sqlserver.server
>I'm porting a web based MS Access app (ASP) to MS SQL
Server. With Access,
>since it isn't multi-user, I always opened the database
late and closed it
>early in the code. Should I do the same thing with SQL
Server or is it OK
>to open/close the database at the HTTP session
start/end? There will be
>about 50 or so concurrent users. Thanks in advance.
>
>

Open late close early

I'm porting a web based MS Access app (ASP) to MS SQL Server. With Access,
since it isn't multi-user, I always opened the database late and closed it
early in the code. Should I do the same thing with SQL Server or is it OK
to open/close the database at the HTTP session start/end? There will be
about 50 or so concurrent users. Thanks in advance.It's still recommended that you "open late" / "close early" if you're using
any kind of pooled connection library. That way, connections will be able
to stay in the pool as long as possible.
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"Bob Smith" <noemail@.please.com> wrote in message
news:mCrkd.5370$z3.2192@.bignews5.bellsouth.net...
> I'm porting a web based MS Access app (ASP) to MS SQL Server. With
Access,
> since it isn't multi-user, I always opened the database late and closed it
> early in the code. Should I do the same thing with SQL Server or is it OK
> to open/close the database at the HTTP session start/end? There will be
> about 50 or so concurrent users. Thanks in advance.
>|||"Bob Smith" <noemail@.please.com> wrote in message
news:mCrkd.5370$z3.2192@.bignews5.bellsouth.net...
> I'm porting a web based MS Access app (ASP) to MS SQL Server. With
Access,
> since it isn't multi-user, I always opened the database late and closed it
> early in the code. Should I do the same thing with SQL Server or is it OK
> to open/close the database at the HTTP session start/end? There will be
> about 50 or so concurrent users. Thanks in advance.
You don't really have the concept of "open" and "closing" a database in SQL
Server, but in general, you want to keep your actual work with the server
short and sweet. Keeping this attitude will help you avoid unnecessarily
prolonged transactions, blocking, etc.

>|||Hi Bob,
Thanks for your post and thanks for Adam and Greg's
input.
"Open late, close early" is a good practice as this
frees resources while other logic is processing. I
suggest that you refer to this article for more
information:
258939 Recommendations for Connecting to Databases
Through Internet Information
http://support.microsoft.com/?id=258939
If you have any further questions or concerns please
feel free to let us know.
Sincerely,
William Wang
Microsoft Online Partner Support
Get Secure! - <www.microsoft.com/security>
========================================
=============
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and
confers no rights.
--
>From: "Bob Smith" <noemail@.please.com>
>Newsgroups: microsoft.public.sqlserver.server
>Subject: Open late close early
>Lines: 7
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
>Message-ID: <mCrkd.5370$z3.2192@.bignews5.bellsouth.net>
>X-Complaints-To: abuse@.bellsouth.net
>X-Abuse-Info: Please forward a copy of all headers for
proper handling
>X-Trace:
ldjgbllpbapjglppdbdpiflmbcekedmfhojhikkb
agflhcbongabknppn
iiihliedillphahkfobdkeobjmjdcnmpcaoablgh
iflhmddniifjhbmkd
mkllegdncmpbddgkbmehoimepnghmlnnpbhhjapg
cojabh
>NNTP-Posting-Date: Wed, 10 Nov 2004 11:47:14 EST
>Organization: BellSouth Internet Group
>Date: Wed, 10 Nov 2004 11:49:37 -0500
>Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fastwe
bnet.it!tiscali!newsfeed1.ip.tiscali.net!news.glorb.com!b
igfeed.bellsouth.net!bignumber.bellsouth.net!news.bellsou
th.net!bignews5.bellsouth.net.POSTED!1ec21f86!not-for-mai
l
>Xref: cpmsftngxa10.phx.gbl
microsoft.public.sqlserver.server:366921
>X-Tomcat-NG: microsoft.public.sqlserver.server
>I'm porting a web based MS Access app (ASP) to MS SQL
Server. With Access,
>since it isn't multi-user, I always opened the database
late and closed it
>early in the code. Should I do the same thing with SQL
Server or is it OK
>to open/close the database at the HTTP session
start/end? There will be
>about 50 or so concurrent users. Thanks in advance.
>
>

Open late close early

I'm porting a web based MS Access app (ASP) to MS SQL Server. With Access,
since it isn't multi-user, I always opened the database late and closed it
early in the code. Should I do the same thing with SQL Server or is it OK
to open/close the database at the HTTP session start/end? There will be
about 50 or so concurrent users. Thanks in advance.It's still recommended that you "open late" / "close early" if you're using
any kind of pooled connection library. That way, connections will be able
to stay in the pool as long as possible.
--
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"Bob Smith" <noemail@.please.com> wrote in message
news:mCrkd.5370$z3.2192@.bignews5.bellsouth.net...
> I'm porting a web based MS Access app (ASP) to MS SQL Server. With
Access,
> since it isn't multi-user, I always opened the database late and closed it
> early in the code. Should I do the same thing with SQL Server or is it OK
> to open/close the database at the HTTP session start/end? There will be
> about 50 or so concurrent users. Thanks in advance.
>|||"Bob Smith" <noemail@.please.com> wrote in message
news:mCrkd.5370$z3.2192@.bignews5.bellsouth.net...
> I'm porting a web based MS Access app (ASP) to MS SQL Server. With
Access,
> since it isn't multi-user, I always opened the database late and closed it
> early in the code. Should I do the same thing with SQL Server or is it OK
> to open/close the database at the HTTP session start/end? There will be
> about 50 or so concurrent users. Thanks in advance.
You don't really have the concept of "open" and "closing" a database in SQL
Server, but in general, you want to keep your actual work with the server
short and sweet. Keeping this attitude will help you avoid unnecessarily
prolonged transactions, blocking, etc.
>|||Hi Bob,
Thanks for your post and thanks for Adam and Greg's
input.
"Open late, close early" is a good practice as this
frees resources while other logic is processing. I
suggest that you refer to this article for more
information:
258939 Recommendations for Connecting to Databases
Through Internet Information
http://support.microsoft.com/?id=258939
If you have any further questions or concerns please
feel free to let us know.
Sincerely,
William Wang
Microsoft Online Partner Support
Get Secure! - <www.microsoft.com/security>
=====================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and
confers no rights.
--
>From: "Bob Smith" <noemail@.please.com>
>Newsgroups: microsoft.public.sqlserver.server
>Subject: Open late close early
>Lines: 7
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
>Message-ID: <mCrkd.5370$z3.2192@.bignews5.bellsouth.net>
>X-Complaints-To: abuse@.bellsouth.net
>X-Abuse-Info: Please forward a copy of all headers for
proper handling
>X-Trace:
ldjgbllpbapjglppdbdpiflmbcekedmfhojhikkbagflhcbongabknppn
iiihliedillphahkfobdkeobjmjdcnmpcaoablghiflhmddniifjhbmkd
mkllegdncmpbddgkbmehoimepnghmlnnpbhhjapgcojabh
>NNTP-Posting-Date: Wed, 10 Nov 2004 11:47:14 EST
>Organization: BellSouth Internet Group
>Date: Wed, 10 Nov 2004 11:49:37 -0500
>Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fastwe
bnet.it!tiscali!newsfeed1.ip.tiscali.net!news.glorb.com!b
igfeed.bellsouth.net!bignumber.bellsouth.net!news.bellsou
th.net!bignews5.bellsouth.net.POSTED!1ec21f86!not-for-mai
l
>Xref: cpmsftngxa10.phx.gbl
microsoft.public.sqlserver.server:366921
>X-Tomcat-NG: microsoft.public.sqlserver.server
>I'm porting a web based MS Access app (ASP) to MS SQL
Server. With Access,
>since it isn't multi-user, I always opened the database
late and closed it
>early in the code. Should I do the same thing with SQL
Server or is it OK
>to open/close the database at the HTTP session
start/end? There will be
>about 50 or so concurrent users. Thanks in advance.
>
>

Friday, March 9, 2012

open a web page through SQL SQL job

Hi all,

now, i create a job to open a page on timely basis. The job's Vb script is like that:

Dim WshShell
Set WshShell =CreateObject("WScript.Shell")
WshShell.Run ("http://www.google.com")
Set WsShell = Nothing


when i run that job, i got that error:

The job succeeded. The Job was invoked by User host\username. The last step to run was step 1 (Step 1).


how can i solve it? i still don't know whether that script will open a webpage or not

The following script opens a webpage in a VBS Script:

Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "iexplore.exe http://www.google.com"
Set WsShell = Nothing

|||

I think that one will work in web page. But, now i m trying in SQL job. I have tried with that code. But, nothing happen.

regards,

|||It seems to be impossible to open a website through SQL Server, neither using SQL Agent Job (ActiveX script task), nor using xp_cmdshell. I tried both, and the IEXPLORER process can be started (you can check in Task Manager) and then hung, waiting for some response. I guess this is becausexp_cmdshell operates synchronously. Control is not returned until the command shell command completes. And the SQL Server can't proceed with reponse from IEXPLORER process so both IEXPLORER and SQL Server hangs.|||so, how abt calling a bat file. And then, through bat file, call the web page. is it the possible way?

Open a url in a new window

I'm trying to do something as follows:
I try to pass some field values to a url and render it to a web application.
I tried to do it with a javascript function
javascript:if(window.open('http://server?id=' &
Fields!ID.Value,'Popups','width=400,height=500,location=0,menubar=0,status=0,toolbar=0,scrollbars=1',true)){}
But I had no luck with it. Could someone assist me on this? Thanks!another option would be to use the "Target=_New" in the URL properties.
<a target="_blank" href="http://links.10026.com/?link=the/">http://www.URL.com">The Bible</a>
"fru" wrote:
> I'm trying to do something as follows:
> I try to pass some field values to a url and render it to a web application.
> I tried to do it with a javascript function
> javascript:if(window.open('http://server?id=' &
> Fields!ID.Value,'Popups','width=400,height=500,location=0,menubar=0,status=0,toolbar=0,scrollbars=1',true)){}
> But I had no luck with it. Could someone assist me on this? Thanks!|||I'm trying to address the url to a web application from a report server not
vice versa.
"mresanchez" wrote:
> another option would be to use the "Target=_New" in the URL properties.
> <a target="_blank" href="http://links.10026.com/?link=the/">http://www.URL.com">The Bible</a>
> "fru" wrote:
> > I'm trying to do something as follows:
> >
> > I try to pass some field values to a url and render it to a web application.
> > I tried to do it with a javascript function
> > javascript:if(window.open('http://server?id=' &
> > Fields!ID.Value,'Popups','width=400,height=500,location=0,menubar=0,status=0,toolbar=0,scrollbars=1',true)){}
> >
> > But I had no luck with it. Could someone assist me on this? Thanks!

Open a blank or new record set code needed.

I have an access 2003 Data access page published to the web that gets its data successfully from an MS SQL 2005 server. I need the "page when it opens" to display a new / blank record (not the first record in the table as it does by default) any pointers would be nice thanks Pete...Hi,

Im not sure if this is the best forum for this question as you say the page gets its data successfully from an MS SQL 2005 Database server.

Sorry to not be able to assist more.
|||

If you connect a table through a linked table to SQL Server, you will have to specify a primary key on the Access side, otherwise Access might not know how to update / insert new records.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

Thank you for your input.

I don’t want to sound confusing although I am confused! Here goes. I built the Access database with Access 2007, connecting to a 2005 SQL server. The database tables all have primary keys. The forms all function fine and I used the code in them “d0cmd on open goto newrecord” and the forms open ready for a new record concealing existing data from the users.

I then used access 2003, to create data access pages and publish them to our web site. (nice trick ha?) So far this works fine usingthe record navigator and custom built controls I can ad / edit and create new records. What I need to solve is, when I open a data access page over the internet the first record is displayed. I need the page to open and be ready to accept a new record showing all blank fields and not existing records.

The data assess page requires different coding to accomplish this than the forms and this is where I am getting lost?

|||I found the solution this was easy, open the dataaccess page in design view in access, select edit / page and set the can edit properties to false, the page opens to a blank record and will not reveal other records, just what i wanted.

Open a blank or new record set code needed.

I have an access 2003 Data access page published to the web that gets its data successfully from an MS SQL 2005 server. I need the "page when it opens" to display a new / blank record (not the first record in the table as it does by default) any pointers would be nice thanks Pete...Hi,

Im not sure if this is the best forum for this question as you say the page gets its data successfully from an MS SQL 2005 Database server.

Sorry to not be able to assist more.
|||

If you connect a table through a linked table to SQL Server, you will have to specify a primary key on the Access side, otherwise Access might not know how to update / insert new records.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

Thank you for your input.

I don’t want to sound confusing although I am confused! Here goes. I built the Access database with Access 2007, connecting to a 2005 SQL server. The database tables all have primary keys. The forms all function fine and I used the code in them “d0cmd on open goto newrecord” and the forms open ready for a new record concealing existing data from the users.

I then used access 2003, to create data access pages and publish them to our web site. (nice trick ha?) So far this works fine usingthe record navigator and custom built controls I can ad / edit and create new records. What I need to solve is, when I open a data access page over the internet the first record is displayed. I need the page to open and be ready to accept a new record showing all blank fields and not existing records.

The data assess page requires different coding to accomplish this than the forms and this is where I am getting lost?

|||I found the solution this was easy, open the dataaccess page in design view in access, select edit / page and set the can edit properties to false, the page opens to a blank record and will not reveal other records, just what i wanted.

Open / Read / Split / Insert / Repeat

Right now I have a web page that when you click on the only button on the page it opens a text file, reads a line from the text file, splits the comma separated line and stores it in to an array 'strData' and then moves on to the next line and repeats this process.

What I want to do before it goes to the next line is insert that strData in to a SQL DB.

This is my InsertCommand for my SqlDataSource1:
InsertCommand="INSERT INTO [Numbers] ([WTN], [DSL_Qualified], [DSL_Qualified_Date], [Equip_1MM], [Line_Trouble], [Sync_Rate], [Res_Bus], [Host_Remote]) VALUES (@.WTN, @.DSL_Qualified, @.DSL_Qualified_Date, @.Equip_1MM, @.Line_Trouble, @.Sync_Rate, @.Res_Bus, @.Host_Remote)"

Plus the <InsertParameters>:
<InsertParameters>
<asp:Parameter Name="WTN" Type="Int32" />
<asp:Parameter Name="DSL_Qualified" Type="String" />
<asp:Parameter Name="DSL_Qualified_Date" Type="DateTime" />
<asp:Parameter Name="Equip_1MM" Type="String" />
<asp:Parameter Name="Line_Trouble" Type="String" />
<asp:Parameter Name="Sync_Rate" Type="String" />
<asp:Parameter Name="Res_Bus" Type="String" />
<asp:Parameter Name="Host_Remote" Type="String" />
</InsertParameters
So I'm not sure exactly what to do after this:

while (file.Peek() > -1)
{
string strCSVData = file.ReadLine();

string [] strData = strCSVData.Split(',');

// somehow get strData in to the SqlDataSource1.Insert method??

}

Any help would be appreciated.

Thanks.

DataSource controls are meant to be databound to other controls. You can programmatically control them, but they can be a bit touchy if you do.

This is what you want:

(Written in vb.net, sorry)

Dim conn as new sqlconnection("{Your connect string here}") ' or pull from web.config

dim cmd as new sqlcommand("INSERT INTO [Numbers] ([WTN], [DSL_Qualified], [DSL_Qualified_Date], [Equip_1MM], [Line_Trouble], [Sync_Rate], [Res_Bus], [Host_Remote]) VALUES (@.WTN, @.DSL_Qualified, @.DSL_Qualified_Date, @.Equip_1MM, @.Line_Trouble, @.Sync_Rate, @.Res_Bus, @.Host_Remote)",conn)

cmd.parameters.add("@.WTN",int)

cmd.parameters.add("@.DSL_Qualified",varchar)

cmd.parameters.add("@.DSL_Qualified_Date",datetime)

{add rest of parameters here}

conn.open;

while (file.Peek() > -1)
{
string strCSVData = file.ReadLine();

string [] strData = strCSVData.Split(',');

// somehow get strData in to the SqlDataSource1.Insert method??

cmd.parameters("@.WTN").value=strData[0];

cmd.parameters("@.DSL_Qualified").value=strData[1];

{Set rest of parameters here}

cmd.executenonquery;

}

conn.close;

Your other choices if you really want to continue with the sqldatasource control, is to set the parameters using the default values, then call the .insert method of the datasource control. If that doesn't work, then you can make strData class scoped variable (Private member for C#?), call the .insert method, and catch the datasource_Inserting event, and set the sqlcommand parameters there via e.command.parameters.

Wednesday, March 7, 2012

only show fields that have data in reportviewer

Hi all,

I am using reportviewer control in Visual Web Developer. It uses a report (Report.rdlc with a table) to show all the fields. I am using a stored procedure to populate the dataset. How can I set the reportviewer or the table to increase or decrease the number of columns it shows depending on the names and number of fields pulled from the database. The user has an option of choosing the fields she/he wants on the report but right now all the coulmns show (even those which I am not selecting from the database, i.e. columns with no data).

Please help,

Thanks,

bullpit

have a look at thishttp://en.wikipedia.org/wiki/Double_posting|||

I got your point. Actually I was not sure which forum I should submit this post. I found two forums which looked related to my problem so I posted in both of them. But now I know this should not be done, would you please let me know how to delete one.

Thanks