Showing posts with label box. Show all posts
Showing posts with label box. Show all posts

Wednesday, March 28, 2012

Precompile asp.net and Reports bomb

If I publish a website in vs05 and Check "Allow this precompiled
website to be updatable", everything works.
If I uncheck the box, then the rdlc files get sent to the website
minus their guts, but with the standard placeholder text you see in
aspx files that are precompiled.
When you request a local report in your web page, it errors out:
An error occurred during local report processing.
The definition of the report 'Main Report' is invalid.
The report definition is not valid. Details: Data at the root level
is invalid. Line 1, position 1.
Any solution for this?
FYI -others
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=232869&SiteID=1Hi Chuck,
Thank you for posting.
Yes, as for the problem you mentioend, it does be an existing problem with
the VS 2005/ASP.NET 2.0 when we use the "publish web site" function with
"not updatable" option. Actually under such mode, the ASP.NET2.0 compiler
will precompile all the pages and other document stuffs in the application
directory and remove the code files (only put a dummy file in the target
directory). So files such as our custom rdlc file will also be corrupted in
such cases.
I've also had a look at the forum thread you mentioned, and that thread
does point out the workarounds we have currently.
#1 One is manually copy the original file to the target server to overwrite
the dummy one(produced by the compiler when using 'nonupdatable' option).
And to do this in VS 2005 IDE, you can consider use the "Copy Web Site"
function to update such individual file, this won't cause recompilation.
#2 Another option will be using automation script or batch build file to do
the precompilation work ( the aspnet_compiler.exe tool is the commandline
tool for precompiling asp.net website application), we can add additional
script to copy the correct rdlc file after the precompilation command
executed.
In addition, I think you can also post this issue in our msdn product
feedback site though some other members may already have pointed out this
issue:
http://lab.msdn.microsoft.com/productfeedback/default.aspx
Anyway, I'm sorry for the inconvenience this brings you as this does be a
big pain when there exists many static documents need publishing under
"non-updatable" precompiling option.
Thanks for your understanding.
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
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.
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Hi Chuck,
How are you doing on this or does the information I mentioned helps a
little on this? If there is still anything we can help, please feel free to
post here.
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
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.
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Anyone know if there's been any progress on getting this fixed
From http://developmentnow.com/g/115_2006_5_0_0_753708/Precompile-asp-net-and-Reports-bomb.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.com|||Hi Steven
I usually precompiled my site with the aspnet_compiler (with not-updatable) option. Indeed the rdlc file was corrupted during this process ( 1 KB vs original 17 KB). Your fix #2(replacing the rdlc with the original rdlc file) worked well.
Thanks,
Ra
From http://developmentnow.com/g/115_2006_5_0_0_753708/Precompile-asp-net-and-Reports-bomb.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.comsql

Prebuild HD configuration question

I'm in the process of building a new SQL box. I have the following
configuration in mind and was wondering the best way to appoint the
hard drives. It's an HP DL585 with 4 processors. I'm going to put 4
72gb 15k drives in the internal slots in a raid 0/1 configuration. I
also will have an external drive enclosure that will house 14 36gb 15k
drives. I'm planning on putting the OS and SQL program files along
with logs on the internal drives. For the external enclosure what will
give me better performance: Raid 5 with 13 drives + 1 spare or Raid
0/1 with the 14 drives? I'm planning on putting the data files on the
external enclosure.A RAID 0+1 or 1+0(recommended over 0+1) will always outperform a comparable
Raid 5 when writes are concerned. What will work best for you depends on how
you will use your db(s). If disk space is not an issue I would recommend
going with a RAID 1+0.
Andrew J. Kelly SQL MVP
"BCole8888" <nospambc@.comcast.net> wrote in message
news:1106844697.121710.214580@.c13g2000cwb.googlegroups.com...
> I'm in the process of building a new SQL box. I have the following
> configuration in mind and was wondering the best way to appoint the
> hard drives. It's an HP DL585 with 4 processors. I'm going to put 4
> 72gb 15k drives in the internal slots in a raid 0/1 configuration. I
> also will have an external drive enclosure that will house 14 36gb 15k
> drives. I'm planning on putting the OS and SQL program files along
> with logs on the internal drives. For the external enclosure what will
> give me better performance: Raid 5 with 13 drives + 1 spare or Raid
> 0/1 with the 14 drives? I'm planning on putting the data files on the
> external enclosure.
>

Prebuild HD configuration question

I'm in the process of building a new SQL box. I have the following
configuration in mind and was wondering the best way to appoint the
hard drives. It's an HP DL585 with 4 processors. I'm going to put 4
72gb 15k drives in the internal slots in a raid 0/1 configuration. I
also will have an external drive enclosure that will house 14 36gb 15k
drives. I'm planning on putting the OS and SQL program files along
with logs on the internal drives. For the external enclosure what will
give me better performance: Raid 5 with 13 drives + 1 spare or Raid
0/1 with the 14 drives? I'm planning on putting the data files on the
external enclosure.
A RAID 0+1 or 1+0(recommended over 0+1) will always outperform a comparable
Raid 5 when writes are concerned. What will work best for you depends on how
you will use your db(s). If disk space is not an issue I would recommend
going with a RAID 1+0.
Andrew J. Kelly SQL MVP
"BCole8888" <nospambc@.comcast.net> wrote in message
news:1106844697.121710.214580@.c13g2000cwb.googlegr oups.com...
> I'm in the process of building a new SQL box. I have the following
> configuration in mind and was wondering the best way to appoint the
> hard drives. It's an HP DL585 with 4 processors. I'm going to put 4
> 72gb 15k drives in the internal slots in a raid 0/1 configuration. I
> also will have an external drive enclosure that will house 14 36gb 15k
> drives. I'm planning on putting the OS and SQL program files along
> with logs on the internal drives. For the external enclosure what will
> give me better performance: Raid 5 with 13 drives + 1 spare or Raid
> 0/1 with the 14 drives? I'm planning on putting the data files on the
> external enclosure.
>

Prebuild HD configuration question

I'm in the process of building a new SQL box. I have the following
configuration in mind and was wondering the best way to appoint the
hard drives. It's an HP DL585 with 4 processors. I'm going to put 4
72gb 15k drives in the internal slots in a raid 0/1 configuration. I
also will have an external drive enclosure that will house 14 36gb 15k
drives. I'm planning on putting the OS and SQL program files along
with logs on the internal drives. For the external enclosure what will
give me better performance: Raid 5 with 13 drives + 1 spare or Raid
0/1 with the 14 drives? I'm planning on putting the data files on the
external enclosure.A RAID 0+1 or 1+0(recommended over 0+1) will always outperform a comparable
Raid 5 when writes are concerned. What will work best for you depends on how
you will use your db(s). If disk space is not an issue I would recommend
going with a RAID 1+0.
--
Andrew J. Kelly SQL MVP
"BCole8888" <nospambc@.comcast.net> wrote in message
news:1106844697.121710.214580@.c13g2000cwb.googlegroups.com...
> I'm in the process of building a new SQL box. I have the following
> configuration in mind and was wondering the best way to appoint the
> hard drives. It's an HP DL585 with 4 processors. I'm going to put 4
> 72gb 15k drives in the internal slots in a raid 0/1 configuration. I
> also will have an external drive enclosure that will house 14 36gb 15k
> drives. I'm planning on putting the OS and SQL program files along
> with logs on the internal drives. For the external enclosure what will
> give me better performance: Raid 5 with 13 drives + 1 spare or Raid
> 0/1 with the 14 drives? I'm planning on putting the data files on the
> external enclosure.
>

Wednesday, March 21, 2012

Post to a DB

Alright so here is what I am trying to do.

I have a form that someone fills out it has a text box as title, and a drop down box that is a category, and then a text area that is for their explanation.

On the back end I am using a stored procedure called sp_store_bkm. When I execute this it works just fine and puts the data that I put in it into the to table below is the Stored procedure code:

ALTER PROCEDURE sp_store_bkm
@.oID nvarchar OUTPUT,
@.oTitle nvarchar(50),
@.oCategory nvarchar(50),
@.obkmtext nvarchar(MAX)

AS BEGIN

INSERT INTO tbl_bkms(Title, Category, bkmtext)
VALUES(@.oTitle, @.oCategory, @.obkmtext)
Set @.oID= SCOPE_IDENTITY()
END

Now on my front end it comes up with an error in the lower left (erros on page). When I click on the error for details it seems like it is coming fromt he connection string. I cant find anything wrong with the connection string. Below is my code for the aspx page.

<%@. Page Language="VB" MasterPageFile="~/MasterPage.master" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<script>

function Submit2_onclick() {

Dim Connection As SqlConnection = "server=localhost;Database=BKM.mdf;integrated security=SSPI;"
connection.Open()
Try
Dim command As SqlCommand = New SqlCommand("sp_store_bkm", connection)

command.CommandType = CommandType.StoredProcedure
Dim oID As New SqlParameter("@.oID", SqlDbType.Int)
oID.Direction = ParameterDirection.Output

command.Parameters.Add(oID)
command.Parameters.Add("@.oTitle", title.text)
command.Parameters.Add("@.oCategory", category.text)
command.Parameters.Add("@.obkmtext", bkmtext.text)
command.ExecuteNonQuery()

Dim sOrderID As String = oID.Value }
</script>

<form method="post">
<table cellpadding="10" style="width: 100%">
<tr>
<td style="width: 100px">
<span style="font-size: 10pt; font-family: Verdana">
Login ID:
<br />
</span>
<asp:LoginName ID="LoginName1" runat="server" Font-Names="Verdana" Font-Size="10pt" ForeColor="Red" />
<span style="font-size: 10pt; font-family: Verdana">
<br />
<br />
Title:<br />
</span>
<input id="title" style="width: 374px" type="text" /><br />
<br />
<span style="font-size: 10pt; font-family: Verdana">
Category:<br />
</span>
<select id="Category" name="D1" size="1" language="javascript" onclick="return Select1_onclick()">
<option selected="selected">Office Applications</option>
<option>VPN</option>
<option>WLAN</option>
</select>

<br />
<span style="font-size: 10pt; font-family: Verdana">
<br />
Your BKM<br />
</span>
<textarea id="bkmtext" style="width: 378px; height: 196px"></textarea><br />
<br />
<input id="Reset1" type="reset" value="reset" />
<input id="Submit2" type="submit" value="submit" language="javascript" onclick="return Submit2_onclick()" /></td>
</tr>
</table>
</form>
</asp:Content>

Please help.

What,exactly is the error message?|||

Well I am closer now. I dont get errors on the page, but nothing gets posted into the DB. If there is an easier way to do this let me know. This is the way I was told to do it.

below is the aspx page, the stored procedure is still the same.

<%@. Page Language="VB" MasterPageFile="~/MasterPage.master" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<script language=vbscript type="text/vb">

function Submit2_onclick()

Dim Connection;As SqlConnection = 'Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\BKM.mdf;Integrated Security=True;User Instance=True'
connection.Open()
Try
Dim command As SqlCommand = New SqlCommand("sp_store_bkm", connection)

command.CommandType = CommandType.StoredProcedure
Dim oID As New SqlParameter("@.oID", SqlDbType.Int)
oID.Direction = ParameterDirection.Output

command.Parameters.Add(oID)
command.Parameters.Add("@.oTitle", title.text)
command.Parameters.Add("@.oCategory", category.text)
command.Parameters.Add("@.obkmtext", bkmtext.text)
command.ExecuteNonQuery()

Dim sOrderID As String = oID.Value
End function
</script>

<form method="post">
<table cellpadding="10" style="width: 100%">
<tr>
<td style="width: 100px">
<span style="font-size: 10pt; font-family: Verdana">
Login ID:
<br />
</span>
<asp:LoginName ID="LoginName1" runat="server" Font-Names="Verdana" Font-Size="10pt" ForeColor="Red" />
<span style="font-size: 10pt; font-family: Verdana">
<br />
<br />
Title:<br />
</span>
<input id="title" type="text" /><br />
<br />
<span style="font-size: 10pt; font-family: Verdana">
Category:<br />
</span> <select id="category">

<option selected="selected"></option>
<option>VPN</option>
</select>

<br />
<span style="font-size: 10pt; font-family: Verdana">
<br />
Your BKM<br />
</span>
<textarea id="bkmtext" style="width: 589px; height: 179px"></textarea><br />
<input id="Reset1" type="reset" value="reset" />
<input id="Submit2" type="submit" value="submit BKM" language=vbscript /></td>
</tr>
</table>
</form>
</asp:Content>

|||

now I get the error when I click submit that says

line 265
char: 1
Error: Type mismatch: 'Submit2_onclick'
Code: 0
URL: http://localhost:1755/rvosd_website/bkm/default.aspx

Tuesday, March 20, 2012

Post method in ASP stops working

I am having an issue on a windows 2003 box where I run a report to a new
window, and I do a request.form to get all my parameters. The first time I
run a report to a new window I am prompted for the windows user name and
password. Once I enter in the login info my report runs fine. Then when I try
to run another report to a new window the request.form doesn't work to pull
things in from my form. Everything is blank, so I get error messages. Another
report will not run until I shutdown IE restart IE log back into my website
and run the report.
My redirect string is
http://Session('sServer')/ReportServer?/Session("sProjectCode")/sReport &
"&rs:Command=render&rs:Format=HTML4.0&rc:Paramaters=False"
Can anyone tell me why the post method or Request.form will only work once
and then I have to restart IE. Again I am opening the report in a new window.
--
Thanks,
CraigI fixed this by going into IIS and going into the properties on the Reports
and ReportServer Virtual directories and under Directory security enabling
anonymous access.
"Craig" wrote:
> I am having an issue on a windows 2003 box where I run a report to a new
> window, and I do a request.form to get all my parameters. The first time I
> run a report to a new window I am prompted for the windows user name and
> password. Once I enter in the login info my report runs fine. Then when I try
> to run another report to a new window the request.form doesn't work to pull
> things in from my form. Everything is blank, so I get error messages. Another
> report will not run until I shutdown IE restart IE log back into my website
> and run the report.
> My redirect string is
> http://Session('sServer')/ReportServer?/Session("sProjectCode")/sReport &
> "&rs:Command=render&rs:Format=HTML4.0&rc:Paramaters=False"
> Can anyone tell me why the post method or Request.form will only work once
> and then I have to restart IE. Again I am opening the report in a new window.
> --
> Thanks,
> Craig

post from text box to SQL insert

Hello,

I'm trying to update a single field of a record and i want to do it using a standard multi line text box but I'm not sure how to write the c# command to process the sql update. I would also like the entry to be added into the database with line breaks.

Thanks for your help

There is nothing to ask..... you can do it using the same way u r updating the others.... you do not need any c# command.... its the query on which all this depends...

you can use query... : update <table name> set <feild name>= textbox1.text where <condition>....

and about multi lines.... you do not need to worry about line breaks..... the data would be stored in the database just as the way it is in the multiline textbox.... and would be fetched in the same manner...

and do tell me if its any worthy 4 u or not.

|||

Ok - In theroy I get what your saying but then I have VisStudio post out the code I need to make the text box and the supporting data source and I get all of this:

----------------

<asp:TextBox ID="txtNotes" runat="server"></asp:TextBox>
<asp:SqlDataSource ID="sqlUpdateNotes" runat="server" ConnectionString="<%$ ConnectionStrings:dbNetOps %>" DeleteCommand="DELETE FROM [MasterServerlist] WHERE [ID] = ?" InsertCommand="INSERT INTO [MasterServerlist] ([ID], [Notes]) VALUES (?, ?)" ProviderName="<%$ ConnectionStrings:dbNetOps.ProviderName %>" SelectCommand="SELECT [ID], [Notes] FROM [MasterServerlist] WHERE ([ID] = ?)" UpdateCommand="UPDATE [MasterServerlist] SET [Notes] = ? WHERE [ID] = ?">
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="Notes" Type="String" />
<asp:Parameter Name="ID" Type="Int32" />
</UpdateParameters>
<SelectParameters>
<asp:ControlParameter ControlID="gvServers" Name="ID" PropertyName="SelectedValue"
Type="Int32" />
</SelectParameters>
<InsertParameters>
<asp:Parameter Name="ID" Type="Int32" />
<asp:Parameter Name="Notes" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
------------------

What I'm trying to do is :

1: display the contents of the notes field in the text box where the record matches the record selected in a gridview element

2: have the onchange event of the notes field then post back an update to the database and redisplay the new notes in the text field

I'm very new to ASP and appriciate your help.

Thank you

|||

I cannot find anything wrong in your code... could you please describe your problem in details...... or what kind of errors you are receiving(if any).....

And also you wanted to store all the data in the textbox to the database with the line breaks.... you should set the textmode attribute of textbox to multiline...

Friday, March 9, 2012

Possible to perform mathematical functions on two or more text boxes?

I am looking to take the sum of the values displayed in a couple text
boxes and display the result in another text box. Is it at all
possible to include the values displayed in other text boxes in
expressions in other text boxes?On Jul 11, 8:19 am, mtnbiker419 <rdrace...@.gmail.com> wrote:
> I am looking to take the sum of the values displayed in a couple text
> boxes and display the result in another text box. Is it at all
> possible to include the values displayed in other text boxes in
> expressions in other text boxes?
If I'm understanding you correctly and you want field values displayed
in textboxes (i.e., table control cells/text boxes, etc), you can
reference them within the dataset itself (if they are aggregates or
can be aggregated):
=Fields!FieldName.Value + Sum(Fields!FieldNameInOtherDataset.Value,
"DatasetNameUsedInTextboxB")
-or similarly -
=Fields!FieldName.Value + Avg(Fields!FieldNameInOtherDataset.Value,
"DatasetNameUsedInTextboxB")
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant

Possible to Limit the Export Formats

Is it possible to limit the export formats from the Report Viewer control? Specifically the options that appear in the dropdown box. I'm using it in an ASP.NET environment (RTM) and remote mode of the ReportViewer control.
In remote mode, we can edit the rsreportserver.config file on the Report Server to limit the available export formats but that will enforce for all the reporting applications running on that machine.
Can we restrict it for one of the reporting application deployed on the reporting Services and not for all?

Unfortunately the list is not customizable. You can, however, hide the dropdown entirely and add your own to the form that includes only the formats you want. You can programmatically access to all available rendering extensions through ReportViewer.LocalReport.Render().

Possible to insert a page break?

I have a question regarding page break. Is there a way to add a page break
before a text box?
I know you can do this with tables, but I need to have the textbox which
contains the table title to start at the top of the page, instead of the
table itself. Thanks.
-JosephI'm not sure I understand the issue correctly, but did you try putting the
textbox inside a rectangle and add the page break on the rectangle?
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Joseph" <Joseph@.discussions.microsoft.com> wrote in message
news:72370566-0AAA-435C-B376-F16064A3D9EF@.microsoft.com...
> I have a question regarding page break. Is there a way to add a page
break
> before a text box?
> I know you can do this with tables, but I need to have the textbox which
> contains the table title to start at the top of the page, instead of the
> table itself. Thanks.
> -Joseph|||Rectangle solves my needs. Thanks Robert.
Joseph
"Robert Bruckner [MSFT]" wrote:
> I'm not sure I understand the issue correctly, but did you try putting the
> textbox inside a rectangle and add the page break on the rectangle?
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Joseph" <Joseph@.discussions.microsoft.com> wrote in message
> news:72370566-0AAA-435C-B376-F16064A3D9EF@.microsoft.com...
> > I have a question regarding page break. Is there a way to add a page
> break
> > before a text box?
> >
> > I know you can do this with tables, but I need to have the textbox which
> > contains the table title to start at the top of the page, instead of the
> > table itself. Thanks.
> >
> > -Joseph
>
>