Wednesday, March 28, 2012
Need Help - Quick simple implementation of code
I am looking for a very simple and straighforward way of calling an already
deployed report from ASP.net. I simply need a hyperlink that displays the
report on screen if that is possible.
Any help would be tremendously appreciated.Hi Dan.
You can download this ASP.NET demo, it would help you rendering the report.
http://www.rdlcomponents.com/ASPExamples/default.aspx
Thanks
Jerry
"Dan Colgan via SQLMonster.com" wrote:
> Hi,
> I am looking for a very simple and straighforward way of calling an already
> deployed report from ASP.net. I simply need a hyperlink that displays the
> report on screen if that is possible.
> Any help would be tremendously appreciated.
>sql
Monday, March 26, 2012
Need Help
the user searches the database and the search result is shown in a datagrid
the user has the option to select any records displayed using a checkbox
and they can enter values into the textboxes (or leave it empty) and when they say edit
the app updates the database the selected rows with values from the 8 textboxes id any of the text boxes are empty or "" then the existing value in that column has to be retained if the text box is not empty then then the new value is updated
the way i am doing it now is putting the update statement in a for loop and checking if the text box is not null and then updating the DB for that row
the problem is that if the user selects 5000 rows then the app has to do 5000 updates.
and it is a big performance problem
I want to do this update in the SQL 2000 by using a Stored Proc or do I need to use a Cursor
can somebody help me with small code snippet ..
Thanks
PKGCan you show us some code? Like what the update looks like?
In your case though, I might use a work table...and do the updates on the server...|||Originally posted by Brett Kaiser
Can you show us some code? Like what the update looks like?
In your case though, I might use a work table...and do the updates on the server...
here is a sample update statement
UPDATE BIRECIN SET GLDEBIT = '789945562.524', GLCREDIT ='74859612.586' WHERE EntryClass = 'AADM' and AccCode ='MDH' and RevArea='CCU '
then..
UPDATE BIRECIN SET GLDEBIT = '789945562.524', GLCREDIT ='74859612.586' WHERE EntryClass = 'AAFM' and AccCode ='MDH' and RevArea='CCI '
this update statement is inside a for loop and gets executed for n number of rows|||Use the isnull function
Update YourTable
Set YourExistingValue = isnull(@.YourNewValue, YourExistingValue)
From YourTable
Where Keyfield = @.KeyField
If @.YourNewValue is null, the old value is retained.
If you can't submit null values, but have to submit zero-length strings instead, this should work:
Set YourExistingValue = isnull(null(@.YourNewValue, ''), YourExistingValue)
blindman|||Yeah, ok, but he wants to update an entire record set back to the database...
How would you do that...
He says he's looping like 5,000 times...
How do you get the data?|||I get it. The table he is updating with the check boxes isn't in SQL server. It's a dataset in his asp page?
Criminy. That's an asp problem, and out of my scope.
blindman|||Is there some way in asp to write the records (or just the checked ones) back into a temporary table that he could then join to his raw data tables?
blindman|||Yeah, that's what I was thinking, so he could do a set based op instead..
like bcp the data or is there an asp method...
There's got to be asp forums someplace...
We got the db section covered|||How about ...
Here (http://www.dbforums.com/forumdisplay.php?forumid=192)
Guys .. dont you ever look outside
dBforums Database Server Software Microsoft SQL Server|||Originally posted by Enigma
How about ...
Here (http://www.dbforums.com/forumdisplay.php?forumid=192)
Guys .. dont you ever look outside
dBforums Database Server Software Microsoft SQL Server
Sure do:
http://www.sqlteam.com/default.asp
Front end stuff...No thanks...see what a vb developer is making?
Enough to muddle through...not enough to be tapped to code...
The horror...the sheer horror...
Besides...I make all of the developers call stored procedures...they just present what I give them..|||The way the world should be. We cook the food. They can arrange it on the plate. Bon apetit', and my complements to the chef.
blindman|||Originally posted by blindman
The way the world should be. We cook the food. They can arrange it on the plate. Bon apetit', and my complements to the chef.
blindman
That's a GREAT analogy...
Friday, March 23, 2012
Need Dynamic SQL Select turotrial
Need a tutorial on how to use ASP.net to dynamically build a SQL2000 compatible SELECT statement for a multiple keyword search. I need a search that will find any combination of one or more keywords in the Keyword string in any order.
Thank you
Do you mean full text searching? (Searching for a particular word within a lot of text)
|||I have a database column 'Description' varchar(600) that contains product descriptions. I need to search it looking for any of the keywords contained in a Keyword string.
Example Keyword string - sail boat hardware
I need it to find all rows WHERE 'sail' or 'boat' or 'hardware' is found.
Thank you
|||That form of search is more a full text search rather than a dynamic search. The latter is searching on one to many columns as selected at runtime.
|||I am using a shared SQL2000 server. What I want to do is find a way in ASP.Net to take the keyword string entered and convert it into a Sql2000 select statement like below.
Keywords entered: sail boat hardware
SELECT Company, Phone, Description
FROM tblCompanyInfo
WHERE (tbl.CompanyInfo.Description LIKE '%' + "sail" + '%') OR (tbl.CompanyInfo.Description LIKE '%' + "boat" + '%') OR (tbl.CompanyInfo.Description LIKE '%' + "hardware" + '%')
Look athttp://msdn2.microsoft.com/en-gb/sql/aa336289.aspx
|||I am actualy looking for an ASP routine that splits the Keyword string and creates the OR elements for a Sql2000 compatible Sql SELECT command. I have looked at the many CONTAINS options discussed in the article but did not find any that offer a split like solution. As for a full text search, that option is not available at least not in the shared SQL environment that I am using.
Thank you
|||In which case you need to roll your own text search solutions.
Create a Noise words table to contain words that you do not want indexed.
|||Looks like someone should create a new ASP.Net SearchControl. A bunch of us out here could sure use it.
Thank you for the follow up.
sqlWednesday, March 21, 2012
Need Coding for inserting data into SQL Server Using stored proecdure.
Hi to all..
I am new to ASP.Net, I want coding for inserting data in to SQL server 2005 that code contain the following criteria.
1.ASP.Net using C#.Net.
2.Using Stored Procdure.
3.the connetion string ,command , Data reader is in the same class. this class will be reusable for other page also without modifying any thing in it.
Please Help me.
Advance thanks.
Balaji,
I have an article in VB.NET which explains how to insert images to SQL server. Apart from images, i am using other columns to insert into the table.
Here is the article link:http://aspalliance.com/138_Inserting_Images_to_SqlServer_in_ASP_NET
And here is a link which will convert any VB.net code to c#http://labs.developerfusion.co.uk/convert/vb-to-csharp.aspx
Also, here is another link from ASP.NET quick starts which explains your scenario.
http://quickstarts.asp.net/QuickStartv20/aspnet/doc/data/databases.aspx#insert
Hope this helps.
|||
See if below thread can be useful.
http://forums.asp.net/t/1165758.aspx
Monday, March 12, 2012
Need advice on SQL Server account to use for my ASP.NET application
I know it's bad to use the built-in SA account to access SQL Server from my ASP.NET application.
I did some reading but would like some suggestions as well. One article I read talked about Application roles in SQL Server. Is this the best way to handle SQL Server access for read/write/update/delete privileges from an ASP.NET application?
If this is the way to go, how do I set it up? Can anyone suggest a good web site to read up on this?Yes look at the Microsoft Patterns and Practices Site..."Building Secure Microsoft ASP.NET Applications"
Monday, February 20, 2012
Navigation not working after clicking once
Recently we have new reports with graphs...when clicked on detail for graph
I have to open another report detail in a new window. I have created a
link(naviagtion URL property for textbox ) in the main graph report to open
the detail report link as
="javascript:void(document.open('/ReportViewer/ReportFrame.aspx?rptPath=REPORTPATH&args="
& REPORTPARAMETERES &
"','_blank','left=50,top=50,width=800,height=580,menubar=no,resizable=yes,scrollbars=Yes,status=yes,toolbar=0'))"
Issue 1 :
The link is working fine for the first time. When I click the link for the
first time...the new window opens fine with the detail report...but when i
close the new window(detail report) and click the link nothing happens,no
report open..why. Also if i keep the new window(of detail report) as is
without closing and then click on the link again in the graph report...one
more new window opens up with the detail report...
Why does the link not work when i close the new window and re-click the link
Issue 2 :
I am trying this...
The window we open the report in contains frames..and we open the report in
the lower frame...how can i get the new detail report to open in the same
frame.
I tried using '_self'...but with this the new detail report is open on the
main IE page where our actual application is been open.
Any suggestions to get it working as I wish it tooo...would help.
Thanks.
SKI am still stuck on this...
I am doubting this is some kind of setting issue or what
I changed the URL link to simple
= "javascript:void(window.open('http://www.google.com','_blank'))"
even this ...when i open it for the first time it works fine...but when i
close the new window the link does not work anymore...
fyi : we are deploying the reports in PDF format...any issue with adobe !!!
I get a security warning saying document is trying to open a link...but
nothing opens after the firsttime '
any ideas....
"Sunny" wrote:
> We open reports in new window from an asp.net page..using rs.render method.
> Recently we have new reports with graphs...when clicked on detail for graph
> I have to open another report detail in a new window. I have created a
> link(naviagtion URL property for textbox ) in the main graph report to open
> the detail report link as
> ="javascript:void(document.open('/ReportViewer/ReportFrame.aspx?rptPath=REPORTPATH&args="
> & REPORTPARAMETERES &
> "','_blank','left=50,top=50,width=800,height=580,menubar=no,resizable=yes,scrollbars=Yes,status=yes,toolbar=0'))"
> Issue 1 :
> The link is working fine for the first time. When I click the link for the
> first time...the new window opens fine with the detail report...but when i
> close the new window(detail report) and click the link nothing happens,no
> report open..why. Also if i keep the new window(of detail report) as is
> without closing and then click on the link again in the graph report...one
> more new window opens up with the detail report...
> Why does the link not work when i close the new window and re-click the link
> Issue 2 :
> I am trying this...
> The window we open the report in contains frames..and we open the report in
> the lower frame...how can i get the new detail report to open in the same
> frame.
> I tried using '_self'...but with this the new detail report is open on the
> main IE page where our actual application is been open.
> Any suggestions to get it working as I wish it tooo...would help.
> Thanks.
> SK|||On Mar 28, 2:02 am, Sunny <S...@.discussions.microsoft.com> wrote:
> I am still stuck on this...
> I am doubting this is some kind of setting issue or what
> I changed the URL link to simple
> = "javascript:void(window.open('http://www.google.com','_blank'))"
> even this ...when i open it for the first time it works fine...but when i
> close the new window the link does not work anymore...
> fyi : we are deploying the reports in PDF format...any issue with adobe !!!
> I get a security warning saying document is trying to open a link...but
> nothing opens after the firsttime '
> any ideas....
> "Sunny" wrote:
> > We open reports in new window from an asp.net page..using rs.render method.
> > Recently we have new reports with graphs...when clicked on detail for graph
> > I have to open another report detail in a new window. I have created a
> > link(naviagtion URL property for textbox ) in the main graph report to open
> > the detail report link as
> > ="javascript:void(document.open('/ReportViewer/ReportFrame.aspx?rptPath=REPORTPATH&args="
> > & REPORTPARAMETERES &
> > "','_blank','left=50,top=50,width=800,height=580,menubar=no,resizable=yes,scrollbars=Yes,status=yes,toolbar=0'))"
> > Issue 1 :
> > The link is working fine for the first time. When I click the link for the
> > first time...the new window opens fine with the detail report...but when i
> > close the new window(detail report) and click the link nothing happens,no
> > report open..why. Also if i keep the new window(of detail report) as is
> > without closing and then click on the link again in the graph report...one
> > more new window opens up with the detail report...
> > Why does the link not work when i close the new window and re-click the link
> > Issue 2 :
> > I am trying this...
> > The window we open the report in contains frames..and we open the report in
> > the lower frame...how can i get the new detail report to open in the same
> > frame.
> > I tried using '_self'...but with this the new detail report is open on the
> > main IE page where our actual application is been open.
> > Any suggestions to get it working as I wish it tooo...would help.
> > Thanks.
> > SK
It sounds kind-of-like your browser settings are not allowing pop-
ups.
Regards,
Enrique Martinez
Sr. Software Consultant|||Thanks EMartinez for the reply...
But no I have tried that...by allowing any popups...
It seems really strange...I think it has something to do with adobe
reader...no idea what?
The link opens fine for the first time...the second time i click ..nothing
happens except i get the security errror from adobe reader saying the
document is trying to open the link bla bla. The link works fine when the
window opened the first time is kept open!Whyyyyy
"EMartinez" wrote:
> On Mar 28, 2:02 am, Sunny <S...@.discussions.microsoft.com> wrote:
> > I am still stuck on this...
> > I am doubting this is some kind of setting issue or what
> >
> > I changed the URL link to simple
> > = "javascript:void(window.open('http://www.google.com','_blank'))"
> >
> > even this ...when i open it for the first time it works fine...but when i
> > close the new window the link does not work anymore...
> >
> > fyi : we are deploying the reports in PDF format...any issue with adobe !!!
> > I get a security warning saying document is trying to open a link...but
> > nothing opens after the firsttime '
> >
> > any ideas....
> >
> > "Sunny" wrote:
> > > We open reports in new window from an asp.net page..using rs.render method.
> > > Recently we have new reports with graphs...when clicked on detail for graph
> > > I have to open another report detail in a new window. I have created a
> > > link(naviagtion URL property for textbox ) in the main graph report to open
> > > the detail report link as
> >
> > > ="javascript:void(document.open('/ReportViewer/ReportFrame.aspx?rptPath=REPORTPATH&args="
> > > & REPORTPARAMETERES &
> > > "','_blank','left=50,top=50,width=800,height=580,menubar=no,resizable=yes,scrollbars=Yes,status=yes,toolbar=0'))"
> >
> > > Issue 1 :
> >
> > > The link is working fine for the first time. When I click the link for the
> > > first time...the new window opens fine with the detail report...but when i
> > > close the new window(detail report) and click the link nothing happens,no
> > > report open..why. Also if i keep the new window(of detail report) as is
> > > without closing and then click on the link again in the graph report...one
> > > more new window opens up with the detail report...
> > > Why does the link not work when i close the new window and re-click the link
> >
> > > Issue 2 :
> > > I am trying this...
> > > The window we open the report in contains frames..and we open the report in
> > > the lower frame...how can i get the new detail report to open in the same
> > > frame.
> > > I tried using '_self'...but with this the new detail report is open on the
> > > main IE page where our actual application is been open.
> >
> > > Any suggestions to get it working as I wish it tooo...would help.
> >
> > > Thanks.
> >
> > > SK
> It sounds kind-of-like your browser settings are not allowing pop-
> ups.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>