Showing posts with label asp. Show all posts
Showing posts with label asp. Show all posts

Wednesday, March 28, 2012

Question about ReportViewer for ASP.NET Pages

hello masters and gurus,
anyone using the reportviewer control provided for integration with asp.net
webform? what should i do to keep the drilldown report to transfer to the
next report but just on the report viewer control? because when i try to
click one..it opens up on the whole page...which is not what i need..
thanks in advance guys...use the rc:replacementroot parameter to inform your reportviewer to open a
linked report in a specific ASPX web page.
The usage is like this
http://mysite/reportserver?/reportname&p1=1&p2=2.....&rc:ReplacementRoot=http://mysite/site/page.aspx?ReportName=
(encode the Replacementroot value with the server.urlencode function)
RS will add the report name at the end of this value, so the "ReportName"
parameter is the parameter passed to the URL filled by RS.
So, when the page "page.aspx" is called, read the ReportName query string
(request("ReportName")) to retrieve the drilled report and all the
associated parameters.
"dotnetprogram" <smalleville@.lycos.com> a écrit dans le message de
news:%23GAy6JXVEHA.2908@.TK2MSFTNGP10.phx.gbl...
> hello masters and gurus,
> anyone using the reportviewer control provided for integration with
asp.net
> webform? what should i do to keep the drilldown report to transfer to the
> next report but just on the report viewer control? because when i try to
> click one..it opens up on the whole page...which is not what i need..
> thanks in advance guys...
>|||It still didn't solve my problem..sorry i wasn't able to mention this..my
page has a frames..wherein the left pane displays the list of reports that
can be used...the right pane therefore is where my report viewer is
located...when i click the drilldown report on that report..it opens it in
the whole page and not just on that frame and on that specific report viewer
control..
hope you can help me with this problem...thanks in advance..
"Jéjé" <willgart@.BBBhotmailAAA.com> wrote in message
news:OnjkSeuVEHA.1152@.TK2MSFTNGP09.phx.gbl...
> use the rc:replacementroot parameter to inform your reportviewer to open a
> linked report in a specific ASPX web page.
> The usage is like this
>
http://mysite/reportserver?/reportname&p1=1&p2=2.....&rc:ReplacementRoot=http://mysite/site/page.aspx?ReportName=
> (encode the Replacementroot value with the server.urlencode function)
> RS will add the report name at the end of this value, so the "ReportName"
> parameter is the parameter passed to the URL filled by RS.
> So, when the page "page.aspx" is called, read the ReportName query string
> (request("ReportName")) to retrieve the drilled report and all the
> associated parameters.
>
> "dotnetprogram" <smalleville@.lycos.com> a écrit dans le message de
> news:%23GAy6JXVEHA.2908@.TK2MSFTNGP10.phx.gbl...
> > hello masters and gurus,
> >
> > anyone using the reportviewer control provided for integration with
> asp.net
> > webform? what should i do to keep the drilldown report to transfer to
the
> > next report but just on the report viewer control? because when i try to
> > click one..it opens up on the whole page...which is not what i need..
> >
> > thanks in advance guys...
> >
> >
>|||Jéjé,
How did you find the "rc:ReplacementRoot=" URL access command? It is not in the SQL RS documentation that I can find. Did you dig around in the assemblies with Reflector, or did one of the MSFT guys post it here? Are there any other useful undocumented commands? Thanks,
-Josh
"Jéjé" wrote:
> use the rc:replacementroot parameter to inform your reportviewer to open a
> linked report in a specific ASPX web page.
> The usage is like this
> http://mysite/reportserver?/reportname&p1=1&p2=2.....&rc:ReplacementRoot=http://mysite/site/page.aspx?ReportName=
> (encode the Replacementroot value with the server.urlencode function)
> RS will add the report name at the end of this value, so the "ReportName"
> parameter is the parameter passed to the URL filled by RS.
> So, when the page "page.aspx" is called, read the ReportName query string
> (request("ReportName")) to retrieve the drilled report and all the
> associated parameters.
>
> "dotnetprogram" <smalleville@.lycos.com> a écrit dans le message de
> news:%23GAy6JXVEHA.2908@.TK2MSFTNGP10.phx.gbl...
> > hello masters and gurus,
> >
> > anyone using the reportviewer control provided for integration with
> asp.net
> > webform? what should i do to keep the drilldown report to transfer to the
> > next report but just on the report viewer control? because when i try to
> > click one..it opens up on the whole page...which is not what i need..
> >
> > thanks in advance guys...
> >
> >
>
>|||You want rc:LinkTarget. Set the value of this HTML device command to the
window name of your main frame when a report is called. Any drill through
links in the report will open in the specified frame.
--
Bryan Keller
Developer Documentation
SQL Server Reporting Services
A friendly reminder that this posting is provided "AS IS" with no
warranties, and confers no rights.
"dotnetprogram" <smalleville@.lycos.com> wrote in message
news:uz1YCl2VEHA.1652@.TK2MSFTNGP09.phx.gbl...
> It still didn't solve my problem..sorry i wasn't able to mention this..my
> page has a frames..wherein the left pane displays the list of reports that
> can be used...the right pane therefore is where my report viewer is
> located...when i click the drilldown report on that report..it opens it in
> the whole page and not just on that frame and on that specific report
viewer
> control..
> hope you can help me with this problem...thanks in advance..
> "Jéjé" <willgart@.BBBhotmailAAA.com> wrote in message
> news:OnjkSeuVEHA.1152@.TK2MSFTNGP09.phx.gbl...
> > use the rc:replacementroot parameter to inform your reportviewer to open
a
> > linked report in a specific ASPX web page.
> > The usage is like this
> >
>
http://mysite/reportserver?/reportname&p1=1&p2=2.....&rc:ReplacementRoot=http://mysite/site/page.aspx?ReportName=
> > (encode the Replacementroot value with the server.urlencode function)
> >
> > RS will add the report name at the end of this value, so the
"ReportName"
> > parameter is the parameter passed to the URL filled by RS.
> > So, when the page "page.aspx" is called, read the ReportName query
string
> > (request("ReportName")) to retrieve the drilled report and all the
> > associated parameters.
> >
> >
> > "dotnetprogram" <smalleville@.lycos.com> a écrit dans le message de
> > news:%23GAy6JXVEHA.2908@.TK2MSFTNGP10.phx.gbl...
> > > hello masters and gurus,
> > >
> > > anyone using the reportviewer control provided for integration with
> > asp.net
> > > webform? what should i do to keep the drilldown report to transfer to
> the
> > > next report but just on the report viewer control? because when i try
to
> > > click one..it opens up on the whole page...which is not what i need..
> > >
> > > thanks in advance guys...
> > >
> > >
> >
> >
>|||That was unintentionally undocumented. Actually it is a command that we use
for Report Manager and we didn't consider that developers would want to use
it for their own projects, so it didn't get as much attention as the others.
We try very hard to document all available commands.
There will be three new commands in SP1 and those will be documented in the
readme.
--
Bryan Keller
Developer Documentation
SQL Server Reporting Services
A friendly reminder that this posting is provided "AS IS" with no
warranties, and confers no rights.
"Josh Robinson" <Josh Robinson@.discussions.microsoft.com> wrote in message
news:57522785-22AA-4985-A921-D96A0EC66A5B@.microsoft.com...
> Jéjé,
> How did you find the "rc:ReplacementRoot=" URL access command? It is
not in the SQL RS documentation that I can find. Did you dig around in the
assemblies with Reflector, or did one of the MSFT guys post it here? Are
there any other useful undocumented commands? Thanks,
> -Josh
>
> "Jéjé" wrote:
> > use the rc:replacementroot parameter to inform your reportviewer to open
a
> > linked report in a specific ASPX web page.
> > The usage is like this
> >
http://mysite/reportserver?/reportname&p1=1&p2=2.....&rc:ReplacementRoot=http://mysite/site/page.aspx?ReportName=
> > (encode the Replacementroot value with the server.urlencode function)
> >
> > RS will add the report name at the end of this value, so the
"ReportName"
> > parameter is the parameter passed to the URL filled by RS.
> > So, when the page "page.aspx" is called, read the ReportName query
string
> > (request("ReportName")) to retrieve the drilled report and all the
> > associated parameters.
> >
> >
> > "dotnetprogram" <smalleville@.lycos.com> a écrit dans le message de
> > news:%23GAy6JXVEHA.2908@.TK2MSFTNGP10.phx.gbl...
> > > hello masters and gurus,
> > >
> > > anyone using the reportviewer control provided for integration with
> > asp.net
> > > webform? what should i do to keep the drilldown report to transfer to
the
> > > next report but just on the report viewer control? because when i try
to
> > > click one..it opens up on the whole page...which is not what i need..
> > >
> > > thanks in advance guys...
> > >
> > >
> >
> >
> >|||The current linktarget URL option works only for the first drilled report,
after RS lost this value and use a target = _Top (so the whole page)
RS keep the replacementroot value during each call.
In my usage, I'm using frames, in my ASPX page, I simply send the ReportName
value to the frame like this:
<frame id=Left src="http://pics.10026.com/?src=myleftmenu.aspx">
<frame id=right src='<%= Request("ReportName") %>
When I call a report, I open it like this URL:
http://myserver/mysite/myframedpage.aspx?ReportName=<http://myserver/reportserver/folder/report
name?rc:ReplacementRoot=http://myserver/mysite/myframedpage.aspx?ReportName>
the content in the < > is URLEncoded
You can create a more complex URL, for example, if you want to keep a state
of your left frame:
http://myserver/mysite/myframedpage.aspx?ReportName=<http://myserver/reportserver/folder/report
name?rc:ReplacementRoot=http://myserver/mysite/myframedpage.aspx?LeftOption=
Menu1&ReportName>
myframedpage.aspx =<frame id=Left src='myleftmenu.aspx?LeftOption=<%=Request("LeftOption")%>'>
<frame id=right src='<%= Request("ReportName") %>
good luck ! :)
I hope the SP1 provides more option to simplify the drill action.
"Bryan Keller [MSFT]" <bryanke@.online.microsoft.com> a écrit dans le message
de news:u9jSSP$VEHA.2696@.TK2MSFTNGP09.phx.gbl...
> You want rc:LinkTarget. Set the value of this HTML device command to the
> window name of your main frame when a report is called. Any drill through
> links in the report will open in the specified frame.
> --
> Bryan Keller
> Developer Documentation
> SQL Server Reporting Services
> A friendly reminder that this posting is provided "AS IS" with no
> warranties, and confers no rights.
>
> "dotnetprogram" <smalleville@.lycos.com> wrote in message
> news:uz1YCl2VEHA.1652@.TK2MSFTNGP09.phx.gbl...
> > It still didn't solve my problem..sorry i wasn't able to mention
this..my
> > page has a frames..wherein the left pane displays the list of reports
that
> > can be used...the right pane therefore is where my report viewer is
> > located...when i click the drilldown report on that report..it opens it
in
> > the whole page and not just on that frame and on that specific report
> viewer
> > control..
> >
> > hope you can help me with this problem...thanks in advance..
> >
> > "Jéjé" <willgart@.BBBhotmailAAA.com> wrote in message
> > news:OnjkSeuVEHA.1152@.TK2MSFTNGP09.phx.gbl...
> > > use the rc:replacementroot parameter to inform your reportviewer to
open
> a
> > > linked report in a specific ASPX web page.
> > > The usage is like this
> > >
> >
>
http://mysite/reportserver?/reportname&p1=1&p2=2.....&rc:ReplacementRoot=http://mysite/site/page.aspx?ReportName=
> > > (encode the Replacementroot value with the server.urlencode function)
> > >
> > > RS will add the report name at the end of this value, so the
> "ReportName"
> > > parameter is the parameter passed to the URL filled by RS.
> > > So, when the page "page.aspx" is called, read the ReportName query
> string
> > > (request("ReportName")) to retrieve the drilled report and all the
> > > associated parameters.
> > >
> > >
> > > "dotnetprogram" <smalleville@.lycos.com> a écrit dans le message de
> > > news:%23GAy6JXVEHA.2908@.TK2MSFTNGP10.phx.gbl...
> > > > hello masters and gurus,
> > > >
> > > > anyone using the reportviewer control provided for integration with
> > > asp.net
> > > > webform? what should i do to keep the drilldown report to transfer
to
> > the
> > > > next report but just on the report viewer control? because when i
try
> to
> > > > click one..it opens up on the whole page...which is not what i
need..
> > > >
> > > > thanks in advance guys...
> > > >
> > > >
> > >
> > >
> >
> >
>|||Yes, your drill throughs will have to support the LinkTarget attribute as
well. What type of action are you using, Jump to Report or Jump to URL? You
may have to convert your reports to Jump to URL. You can still pass
parameters and such if you build your URL as an expression ="http://..."
--
Bryan Keller
Developer Documentation
SQL Server Reporting Services
A friendly reminder that this posting is provided "AS IS" with no
warranties, and confers no rights.
"Jéjé" <willgart@.BBBhotmailAAA.com> wrote in message
news:OZmS10$VEHA.4064@.TK2MSFTNGP11.phx.gbl...
> The current linktarget URL option works only for the first drilled report,
> after RS lost this value and use a target = _Top (so the whole page)
> RS keep the replacementroot value during each call.
> In my usage, I'm using frames, in my ASPX page, I simply send the
ReportName
> value to the frame like this:
> <frame id=Left src="http://pics.10026.com/?src=myleftmenu.aspx">
> <frame id=right src='<%= Request("ReportName") %>
> When I call a report, I open it like this URL:
>
http://myserver/mysite/myframedpage.aspx?ReportName=<http://myserver/reportserver/folder/report
>
name?rc:ReplacementRoot=http://myserver/mysite/myframedpage.aspx?ReportName>
> the content in the < > is URLEncoded
> You can create a more complex URL, for example, if you want to keep a
state
> of your left frame:
>
http://myserver/mysite/myframedpage.aspx?ReportName=<http://myserver/reportserver/folder/report
>
name?rc:ReplacementRoot=http://myserver/mysite/myframedpage.aspx?LeftOption=
> Menu1&ReportName>
> myframedpage.aspx => <frame id=Left
src='myleftmenu.aspx?LeftOption=<%=Request("LeftOption")%>'>
> <frame id=right src='<%= Request("ReportName") %>
> good luck ! :)
> I hope the SP1 provides more option to simplify the drill action.
> "Bryan Keller [MSFT]" <bryanke@.online.microsoft.com> a écrit dans le
message
> de news:u9jSSP$VEHA.2696@.TK2MSFTNGP09.phx.gbl...
> > You want rc:LinkTarget. Set the value of this HTML device command to the
> > window name of your main frame when a report is called. Any drill
through
> > links in the report will open in the specified frame.
> >
> > --
> > Bryan Keller
> > Developer Documentation
> > SQL Server Reporting Services
> >
> > A friendly reminder that this posting is provided "AS IS" with no
> > warranties, and confers no rights.
> >
> >
> > "dotnetprogram" <smalleville@.lycos.com> wrote in message
> > news:uz1YCl2VEHA.1652@.TK2MSFTNGP09.phx.gbl...
> > > It still didn't solve my problem..sorry i wasn't able to mention
> this..my
> > > page has a frames..wherein the left pane displays the list of reports
> that
> > > can be used...the right pane therefore is where my report viewer is
> > > located...when i click the drilldown report on that report..it opens
it
> in
> > > the whole page and not just on that frame and on that specific report
> > viewer
> > > control..
> > >
> > > hope you can help me with this problem...thanks in advance..
> > >
> > > "Jéjé" <willgart@.BBBhotmailAAA.com> wrote in message
> > > news:OnjkSeuVEHA.1152@.TK2MSFTNGP09.phx.gbl...
> > > > use the rc:replacementroot parameter to inform your reportviewer to
> open
> > a
> > > > linked report in a specific ASPX web page.
> > > > The usage is like this
> > > >
> > >
> >
>
http://mysite/reportserver?/reportname&p1=1&p2=2.....&rc:ReplacementRoot=http://mysite/site/page.aspx?ReportName=
> > > > (encode the Replacementroot value with the server.urlencode
function)
> > > >
> > > > RS will add the report name at the end of this value, so the
> > "ReportName"
> > > > parameter is the parameter passed to the URL filled by RS.
> > > > So, when the page "page.aspx" is called, read the ReportName query
> > string
> > > > (request("ReportName")) to retrieve the drilled report and all the
> > > > associated parameters.
> > > >
> > > >
> > > > "dotnetprogram" <smalleville@.lycos.com> a écrit dans le message de
> > > > news:%23GAy6JXVEHA.2908@.TK2MSFTNGP10.phx.gbl...
> > > > > hello masters and gurus,
> > > > >
> > > > > anyone using the reportviewer control provided for integration
with
> > > > asp.net
> > > > > webform? what should i do to keep the drilldown report to transfer
> to
> > > the
> > > > > next report but just on the report viewer control? because when i
> try
> > to
> > > > > click one..it opens up on the whole page...which is not what i
> need..
> > > > >
> > > > > thanks in advance guys...
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>|||I understand - I had noticed that some MSFT developer replies in this newsgroup said to "use the ReplacementRoot command" in the past. I didn't realize it was part of SQL RS and I have been using .NET Framework for something like 3 years now and hadn't seen it there either. Glad to know that it is part of Reporting Services and is usable by developers.
"Bryan Keller [MSFT]" wrote:
> That was unintentionally undocumented. Actually it is a command that we use
> for Report Manager and we didn't consider that developers would want to use
> it for their own projects, so it didn't get as much attention as the others.
> We try very hard to document all available commands.
> There will be three new commands in SP1 and those will be documented in the
> readme.
> --
> Bryan Keller
> Developer Documentation
> SQL Server Reporting Services
> A friendly reminder that this posting is provided "AS IS" with no
> warranties, and confers no rights.
>
> "Josh Robinson" <Josh Robinson@.discussions.microsoft.com> wrote in message
> news:57522785-22AA-4985-A921-D96A0EC66A5B@.microsoft.com...
> > Jéjé,
> > How did you find the "rc:ReplacementRoot=" URL access command? It is
> not in the SQL RS documentation that I can find. Did you dig around in the
> assemblies with Reflector, or did one of the MSFT guys post it here? Are
> there any other useful undocumented commands? Thanks,
> >
> > -Josh
> >
> >
> > "Jéjé" wrote:
> >
> > > use the rc:replacementroot parameter to inform your reportviewer to open
> a
> > > linked report in a specific ASPX web page.
> > > The usage is like this
> > >
> http://mysite/reportserver?/reportname&p1=1&p2=2.....&rc:ReplacementRoot=http://mysite/site/page.aspx?ReportName=
> > > (encode the Replacementroot value with the server.urlencode function)
> > >
> > > RS will add the report name at the end of this value, so the
> "ReportName"
> > > parameter is the parameter passed to the URL filled by RS.
> > > So, when the page "page.aspx" is called, read the ReportName query
> string
> > > (request("ReportName")) to retrieve the drilled report and all the
> > > associated parameters.
> > >
> > >
> > > "dotnetprogram" <smalleville@.lycos.com> a écrit dans le message de
> > > news:%23GAy6JXVEHA.2908@.TK2MSFTNGP10.phx.gbl...
> > > > hello masters and gurus,
> > > >
> > > > anyone using the reportviewer control provided for integration with
> > > asp.net
> > > > webform? what should i do to keep the drilldown report to transfer to
> the
> > > > next report but just on the report viewer control? because when i try
> to
> > > > click one..it opens up on the whole page...which is not what i need..
> > > >
> > > > thanks in advance guys...
> > > >
> > > >
> > >
> > >
> > >
>
>

Monday, March 26, 2012

Question about programming reporting services

Hi there,
We have ASP.NET application and we want to use SQL Server Reporting Services
to display the report links to the end user. Report Server however won't be
accessible from the internet for security reasons. The server side code in
ASP.NET pages on the IIS server can access this report server on intranet. I
was exploring the choices I have to build this functionality.
I think the obvious choice of using URL addressability of SQL RS won't work
because it would mean report server can be accessed from internet. For the
same reason I think ReportServer ASP.NET control that Microsoft ships as
samples also won't work because it uses IFRAME which in turn depends on URL
addressability. So it seems programming using Report Server web service is
the only choice. This means writing code for pagination, laying out report in
landscape/portrait manner as defined in RDL, ability to export the report
etc. Is there a better alternative that anyone can suggest?
Thanks
YogeshYou are understanding it correctly. One point though, are you aware that
Report Server and SQL Server can be on different boxes, so your SQL Server
can be behind the firewall and RS can be accessed from the internet, then
URL integration will work. You would need another license though. Otherwise
until V2 comes out with the web controls your only other option is web
services.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"yogeshprabhu" <yogeshprabhu@.discussions.microsoft.com> wrote in message
news:BE238509-4BBC-46E6-B4FC-6765C4A114F0@.microsoft.com...
> Hi there,
> We have ASP.NET application and we want to use SQL Server Reporting
Services
> to display the report links to the end user. Report Server however won't
be
> accessible from the internet for security reasons. The server side code in
> ASP.NET pages on the IIS server can access this report server on intranet.
I
> was exploring the choices I have to build this functionality.
> I think the obvious choice of using URL addressability of SQL RS won't
work
> because it would mean report server can be accessed from internet. For the
> same reason I think ReportServer ASP.NET control that Microsoft ships as
> samples also won't work because it uses IFRAME which in turn depends on
URL
> addressability. So it seems programming using Report Server web service is
> the only choice. This means writing code for pagination, laying out report
in
> landscape/portrait manner as defined in RDL, ability to export the report
> etc. Is there a better alternative that anyone can suggest?
> Thanks
> Yogesh|||Thanks Bruce. I was aware that Report Server and SQL Server can be on
different boxes, but our organization has decided that they don't want report
server available over internet. Do you know of any books or articles that
explain handling pagination or ability to export the report using web
services?
Yogesh
"Bruce L-C [MVP]" wrote:
> You are understanding it correctly. One point though, are you aware that
> Report Server and SQL Server can be on different boxes, so your SQL Server
> can be behind the firewall and RS can be accessed from the internet, then
> URL integration will work. You would need another license though. Otherwise
> until V2 comes out with the web controls your only other option is web
> services.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>|||I have a couple at work and on Monday will give you the titles to them.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"yogeshprabhu" <yogeshprabhu@.discussions.microsoft.com> wrote in message
news:7246EF1E-0174-4CFA-A7AC-478ADF0AAEEC@.microsoft.com...
> Thanks Bruce. I was aware that Report Server and SQL Server can be on
> different boxes, but our organization has decided that they don't want
> report
> server available over internet. Do you know of any books or articles that
> explain handling pagination or ability to export the report using web
> services?
> Yogesh
>
> "Bruce L-C [MVP]" wrote:
>> You are understanding it correctly. One point though, are you aware that
>> Report Server and SQL Server can be on different boxes, so your SQL
>> Server
>> can be behind the firewall and RS can be accessed from the internet, then
>> URL integration will work. You would need another license though.
>> Otherwise
>> until V2 comes out with the web controls your only other option is web
>> services.
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>|||Besides web services you will also need to be implementing your own
authentication too. Two books I use (both have some on Web services, enough
to get you going but are also good for other topics as well) are: Microsoft
Reporting Services in Action by Teo Lachev and Hitchhiker's Guide to SQL
Server 2000 Reporting Services by Peter Blackburn and William Vaughn.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"yogeshprabhu" <yogeshprabhu@.discussions.microsoft.com> wrote in message
news:7246EF1E-0174-4CFA-A7AC-478ADF0AAEEC@.microsoft.com...
> Thanks Bruce. I was aware that Report Server and SQL Server can be on
> different boxes, but our organization has decided that they don't want
report
> server available over internet. Do you know of any books or articles that
> explain handling pagination or ability to export the report using web
> services?
> Yogesh
>
> "Bruce L-C [MVP]" wrote:
> > You are understanding it correctly. One point though, are you aware that
> > Report Server and SQL Server can be on different boxes, so your SQL
Server
> > can be behind the firewall and RS can be accessed from the internet,
then
> > URL integration will work. You would need another license though.
Otherwise
> > until V2 comes out with the web controls your only other option is web
> > services.
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
>

Question about porting data into a new database.

We rewrote one of our legacy C#/asp.net applications that accesses a sql server 2000 database. The new database schema looks very similar to the old one. The major difference is that some of the atributes in the database tables are different. But pretty much we are using the same tables, plus or minus a few.

We need to import the old data into the new database. I have never had to undertake this type of thing before as I am not a DBA, but a developer. I feel a little scared about this whole process. My boss is open to us hiring a contractor to help with the process.

My biggest concern is the referential integrity of the database.

Can someone help me out. Does this sound like something that can be easily done or should I ask for some help.

Ralph

Can you backup existing DB and restore to the new server and "fix" it in place? As in adding/removing any columns, adding any new tables etc. This will at least guarantee you your existing data integrity. Or is this not an option?

|||

That sounds like a really good idea. I will give it some deep thought!

sql

Question about OLEDB providers

Hi all,
We have an ASP application that uses a mssql2k db and was migrated from
mssql7.
It is using SQLOLEDB provider to connect to db. Recently there was an
escalation
about some performance issues. While trying to debug some long running
queries,
I came across some weird results for the problem queries - they behaved quit
e
differently when executed from Query Analyzer and when called from the app -
e.g.,
lock escalation, timeouts, etc etc. We might have some issues with the app
design...
however, I had a qn related to OLEDB provider for SQL Server and OLEDB
provider
for ODBC - just to make sure that there are no gotchas here...
1. Which of the above two drivers are used internally by Query
Analyzer/Enterprise
Manager etc?
2. Is OLEDB provider for ODBC recommended at all (MS says it is always
better to
use the native provider for SQL Server) over native provider?
TIA
paraa"Client Network Utility" (cliconfg.exe) shows what network libraries you are
using and OLEDB (for all SEM, QA and your ASP apps) on your client side. The
serverside is same regardless (cannot distinguish whether client is using
ODBC or OLEDB) and simply listens for Tabular Data Stream (TDS) traffic.
Changing from v7 to -2000 improves the optimiser stategies and degree of
parallelism [assuming you have latest Service Packs to eliminate bugs].
Mostly locking problems arise due to user contention [apps holding exclusive
locks and long-running transactions]. Suggest you use Profiler to capture
TSQL generated by apps and then replay from [several sessions of] QA to show
they are equivalent.
You can use Profiler to report on Locks(Escalation) if you suspect foul
play. Can always use SEM CurrentActivity or sp_lock or blocker_blockee (in
RK) to see whats happening engine-side
HTH
Dick
"paraa" wrote:

> Hi all,
> We have an ASP application that uses a mssql2k db and was migrated from
> mssql7.
> It is using SQLOLEDB provider to connect to db. Recently there was an
> escalation
> about some performance issues. While trying to debug some long running
> queries,
> I came across some weird results for the problem queries - they behaved qu
ite
> differently when executed from Query Analyzer and when called from the app
-
> e.g.,
> lock escalation, timeouts, etc etc. We might have some issues with the app
> design...
> however, I had a qn related to OLEDB provider for SQL Server and OLEDB
> provider
> for ODBC - just to make sure that there are no gotchas here...
> 1. Which of the above two drivers are used internally by Query
> Analyzer/Enterprise
> Manager etc?
> 2. Is OLEDB provider for ODBC recommended at all (MS says it is always
> better to
> use the native provider for SQL Server) over native provider?
> TIA
> paraa
>|||thx a bunch pal, your info helps
paraa
"Dick in UK" wrote:
> "Client Network Utility" (cliconfg.exe) shows what network libraries you a
re
> using and OLEDB (for all SEM, QA and your ASP apps) on your client side. T
he
> serverside is same regardless (cannot distinguish whether client is using
> ODBC or OLEDB) and simply listens for Tabular Data Stream (TDS) traffic.
> Changing from v7 to -2000 improves the optimiser stategies and degree of
> parallelism [assuming you have latest Service Packs to eliminate bugs].
> Mostly locking problems arise due to user contention [apps holding exclusi
ve
> locks and long-running transactions]. Suggest you use Profiler to capture
> TSQL generated by apps and then replay from [several sessions of] QA to sh
ow
> they are equivalent.
> You can use Profiler to report on Locks(Escalation) if you suspect foul
> play. Can always use SEM CurrentActivity or sp_lock or blocker_blockee (in
> RK) to see whats happening engine-side
> HTH
> Dick
> "paraa" wrote:
>

Wednesday, March 21, 2012

Question about Insert/Update/Delete to return fail/success

I want the stored procedure of insert/update/delete
can return fail/success to asp.net , how can i do thatJoe
CREATE PROCEDURE Proc1 AS
BEGIN TRANSACTION
--UPDATE Table1
--INSERT INTO Table1
--DELETE Table1
SET @.Err = @.@.ERROR
IF @.Err <> 0
BEGIN
ROLLBACK TRANSACTION
RETURN (@.Err)
END
COMMIT TRANSACTION
--usage
EXEC @.Ret = Proc1
SELECT @.Ret = coalesce(nullif(@.Ret, 0),@.@.error,1001)
IF @.Ret <> 0
BEGIN
blabalabalabala --RAISERROR ('An error occured ........,10,1)
END
"joe" <joe@.discussions.microsoft.com> wrote in message
news:522DBA35-DFFF-4505-AAB5-10290E059279@.microsoft.com...
>I want the stored procedure of insert/update/delete
> can return fail/success to asp.net , how can i do that

Tuesday, March 20, 2012

Question about incrementing a field

Hi everyone. I'm a new user to ASP.NET using VB.NET and SQL Server.
I have one question.
I am currently creating a website for my dissertation whereby whenever acustomer purchases a product, a number is incremented within the'Product' table. The column that needs to be incremented is called'ProductSold'.
I have got an Insert query to store the orders in the 'Orders' tablealready within my webpage. Is there a SQL Query that I could use toincrement the number in the 'Product' Table straight after my InsertQuery?
I really appreciate if anyone could help me in this matter!
you could write a stored proc in which you query in for theMAX(productnumber) and increment it and then do the insert. Why not usean Identity column ?
|||Hi Ndinakar,
Thanks for your reply!
You may think I'm really dumb for saying this. But the Identity Columnwill only increment when a new record is made within the productstable? How can I program the Identity Seed to increment when thatproduct is purchased?
And now going on to the Stored Procedure, I will write code toincrement the number and then write the Insert Statement? What do youmean by the MAX(productnumber)?
Could I write the Insert Statment first and then do an Update Statementto increment the number? Can you do that in an Update statement?
Sorry! I'm just really confused.
|||


You may think I'm really dumb for saying this. But the Identity Columnwill only increment when a new record is made within the productstable? How can I program the Identity Seed to increment when thatproduct is purchased?


I read your post in a hurry. Sorry about that.


Could I write the Insert Statment first and then do an Update Statementto increment the number? Can you do that in an Update statement?


Yes. Write your insert stmt first. then followed by an update. Dont worry about the MAX. You could do something like:
UPDATE
Product
SET
ProductSold = ProductSold + 1 ( or however if more than one order wa placed you could use a variable)
WHERE
Productid = ...

|||Oh I see now!
Thanks for all your help! Much appreciated!

Question about html editors with SQL Server

I have been coding in php for a while now and Im starting to get into asp.net. I use htmlarea in php as my html editor, but I was told that it shouldnt be used when using asp.net and sql server, because of it opens the server up for attack scripts. I dont understand why.
Can someone help me out? I would really like to use a html editor with my applications but if it opens the server up for attacks then there is no point on using it.
Thanks,
ChadHello,
You can use it, but make sure you use Server.HtmlEncode() to encode the HTML text, before submitting to the database. The reason is because users can embed javascript or vbscript which can attack the database, or other users who load that HTML later. The script is "active" and will run in the browser, and do whatever malicious thing it may do. Server.HtmlEncode() encodes it, and Server.HtmlDecode() decodes it when you need it later.
Being a PHP developer, from this understanding, I'm curious is this possible to embed script in PHP for attack scripts? I am curious...
HTH.

Question about how to upload file into database(sqlserver express)?

I'm a newbie.

I have googled many web sites,but i can't find the help that how to upload or store files(include images) into a database with Asp.Net 2.0.

Although i have found few samples about storing images into database,but the sample applied with Asp.Net 1.0 or 1.1 technology...

In microsoft MSDN,i found the help about FileUpload control,but the sample is about how to upload files to servers's folder with saveas() method.

Who can help me ?Give me a refer sample about upload files to database with Asp.Net 2.0. Is it need to use stream or what other method?

By the way, i want make a document managment system with vwd and sql express.

Thank u very much if u can give me a help.

The FileUpload control has a FileBytes property that has the raw bytes of a file. You want to save that data to an image column in the database.

I'm not a big fan of storing documents in a database. It wasn't designed for that, and while it can work, it doesn't work well. You're probably better off using the filesystem for the files, while storing the information about the files in the database.

Incidentally, if you're storing important stuff (legal documents, medical records, stuff like that), and you're not keeping the originals, you're asking for trouble.

|||

"you're not keeping the originals, you're asking for trouble."

why?

Friday, March 9, 2012

question about connection string

Hi all,

I am new to asp.net. A book I read teached the way to put connection string in web.config file. the file looks like this:
<configuration>
... other settings here ...
<appSettings>
<add key="DsnWroxBooksSql"
value="server=delmonte; database=WroxBooks; user id=sa; password=" />
... other settings here ...
</appSettings>
</configuration
I was just wondering what the user id "sa" and password ""is? I have seen these in many books. is it a system build in user name and password? Can I use my own user id and password instead? Also must I hardcode the password in web.config file? is there anyway I could get around it?

thank you!SA is the default administrator account for SQL Server. YOu use that when you are using mixed mode for authentication as opposed to windows.

Default password is blank, not recommended of course.

Yes you can create your own account and use it instead.

Question about connection pooling

If I have two ASP.NET applications installed on the same machine, and both are using the same connection string to access SQL Server 2005. Are they share the same pool or use separated pools?

I need to be sure that how many connections would be connected to my database server. For example, the max. connection pool size is 100, if both Web app share the same pool, then there're may be maximum 100 connections to database. It they use separated pools, then connections may grow to 200.

Hi,

per documentation: "Connections are pooled per process, per application domain, per connection string and when using integrated security, per Windows identity."
Source:http://msdn2.microsoft.com/en-us/library/8xx3tyca.aspx (using Connection Pooling)

It means your application would have separate pools, since they are different applications and therefore have their own app domain.

Another thing is that maximum connection pool size is configurable (within connectionstring), 100 is the default maximum limit.

|||

joteke:

per documentation: "Connections are pooled per process, per application domain, per connection string and when using integrated security, per Windows identity."
Source:http://msdn2.microsoft.com/en-us/library/8xx3tyca.aspx (using Connection Pooling)

It means your application would have separate pools, since they are different applications and therefore have their own app domain.

What if my ASP.NET applications all use the same application pool? In this way, are they still have separate pools?

Thank you!

|||They don't because they have different appdomains. Every ASP.NEt application has its own AppDomain. Only connections in same application, using exactly same connection string, would use the same connection pool.|||

Ok! Now I got it.

Thank your for your help :)

Wednesday, March 7, 2012

Question about asp with stored procedure

I not sure I posted in right newsgroup or wrong
but i need your help, thanks~
I am using ASP to write a web application, and which will called a sql 2000
stored procedure through ADODB.Recordset
I can store all provided information correctly if I am type English, other
language such as Tradition chinese or Simplify chinese cannot stored
correctly
And I have saved the asp page as utf-8, and codepage=65001 and
content-type=utf-8
I not sure the problem is that i cannot provide utf-8 data to stored
procedure or not.
Any suggestion?
ThanksHi
As the parameters for the SP NCHAR/NVARCHAR?
You need to use UNICODE data types for most Eastern Languages.
--
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"oa¤?@.¤?¥q" wrote:

> I not sure I posted in right newsgroup or wrong
> but i need your help, thanks~
> I am using ASP to write a web application, and which will called a sql 200
0
> stored procedure through ADODB.Recordset
> I can store all provided information correctly if I am type English, other
> language such as Tradition chinese or Simplify chinese cannot stored
> correctly
> And I have saved the asp page as utf-8, and codepage=65001 and
> content-type=utf-8
> I not sure the problem is that i cannot provide utf-8 data to stored
> procedure or not.
> Any suggestion?
> Thanks
>
>|||Yes
In the stored procedure, I used nvarchar to get the value, which passed from
ASP program
However, the data got by stored procedure is not correct
Do you know why'
Or any I need to do to correct my program?
Thanks~
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:C9401DAF-90AF-40DD-ABF6-5673555ABACD@.microsoft.com...
> Hi
> As the parameters for the SP NCHAR/NVARCHAR?
> You need to use UNICODE data types for most Eastern Languages.
> --
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
>
> "oa?O@.'Dq" wrote:
>
2000
other

Saturday, February 25, 2012

Question

Anyone ever created a database with SQL on the back end and ASp.net on the front end as the gui? Anyone got any thoughts on the matter?? Their personal experiencesYup, done it quite often, no problems what so ever. What are you really asking though?

Feel free to PM me any specific questions.|||the reason I was thinking of ASP.Net is because I was thinking of using it as a front end instead of access xp. But I need to learn how to use it first. Anyone know any good books or any good software packages to get me started? Advice is always nice too :):):)

thank you|||well it really depends in how you want to write it. Do you want to use inline code, code behind or an application? Three very different approaches... all with different pros and cons.

Do you know html well enough to be up to the job?

Have you written any asp or vb before?

Your idea is perfectly workable, but to point you in the right direct means you really need to have a base understanding of how asp.Net works in the first place.|||I have created webpages with HTML several times, cascading styles sheets etc. Asp.net is new to me though|||You might want to start with asp then (as oposed to asp.net) or php just to get the ideas down before leaping into the gapping chasm of .Net.|||Personally, I would not recommend classic asp. What is your development background - what languages have you programmed in - c, c++, Java, vb ... ?|||Okie, my reasons for recommending standard asp are as follows.

1. The language is a piece of cake to learn.
2. Because the language is easy you can concentrate on the important things like the theorys and practises behind write web applications.
3. Because you can learn the langauge quickly and thus pick up the concepts faster you can soon decide if a web app is really what you want.
4. If you know a C based language then vb is childs play.
5. If you don't know a C based language then you should be able to pick up vb faster then other languages.
6. The is really only one style for writting classic asp (ignoring com object development) instead of the 3+ for writing asp.

Reasons for not using standard asp.

1. Out dated.
2. Only works with Microsoft.

... others?