Monday, March 19, 2012
Dynamically Showing Information
My goal is to display information from a sql server database everytime the underlying table has received a change. I will also need to have the ability to format the cells based on the information being populated.
If anyone knows of any technology on this topic, or has attempted to do something similar please respond. Even if it's not quite what I'm looking for, the advice given may spin me in the right direction.
It is my belief that this may require creating this web page through a sql server wizard that offers the ability to watch the table for underlying changes. However I am not so sure about how I would then format the information displayed. Has anyone used
this technology before?
Thanks,
Pink
SQL Server has a web assistant. Start with the BOL topic "Using the Web
Assistant Wizard". Or you could write a trigger to push data modifications
to the web page.
Cindy Gross, MCDBA, MCSE
http://cindygross.tripod.com
This posting is provided "AS IS" with no warranties, and confers no rights.
Sunday, March 11, 2012
Dynamically edit DataSet
Hi,
I have a web application, where the user specifies the criteria for filtering data (with like, In, between... operators and data retrieved from the db). So, the selection criteria query (SQL) is generated. This is somthing similar to Query Wizard. It builds the SQL for WHERE clause only. This needs to be attached with the query (the developer specified during report-design, which is under dataset->commandtext in RDL file).
To clarify, do not want to use parameters. The idea is, the report design need not be modified each time any filters to be added or removed. The user can simply, add/remove the fields and corresponding sql statements for each field from the db (e.g. QueryWizard table).
The functionality to attach the where clause (from web page) to query (specified in reprot-design) is ready. I need to know, is there anyway I can retrieve the query from the RDL programmatically and set it back before the report is rendered (generated).
I heard something about QueryDefinition.Query, which returns the query, but not sure.
Anybody, any suggestion, will be a great help !!
Have you tried Report Builder? What you want sounds very close to what Report Builder is doing (RS 2005)|||I have already explored the option of using the Report Builder. I do not want the end-user to design the report. The end-user should be able to specify the criteria (easy-steps thru Query Wizard) and view the report.
However, in case of Report Builder also, if I want to add new fields for selection criteria, the design of the report requires modification, which is what I dont want to do.
Is there any option? Cannt I edit the dataset programmatically ?
|||Well, DataSet.Query.CommandText can be an expression.
You can try something like this: ="select * from mytable " + ReportParameters!Filter.Value
Friday, March 9, 2012
Dynamically changing Web Service Task parameters at runtime?...
I am trying to access a web service that has parameters (three of them, all strings). But I want to access this service repeatedly, and drive the thing from a table.
I've got the Foreach Loop correctly getting variables from the recordset I populate from the table. That works and I can run a script with msgbox showing all the correct values being read from the table.
My problem is taking these variables and sticking them in the Name / Type / Value entries in the Input tab of the Web Service Task. There doesn't seem to be any mechanism for dynamically updating these at runtime, and if there isn't, that is a HUGE hole in the product. Who accesses Web Services with the same parameters every time?!?
No doubt you know this by now Lazamataz but this can't be done. you're right, it IS a hole in the product!
-Jamie|||
I'm trying to do this to...
Is there a way of accessing web service parameters through a script and the runtime / tasks?
|||Absolutely, yes. Buy Donald Farmer's book (available at the usual places). That has a downloadable chapter that shows you how.
-Jamie
Dynamically changing Web Service Task parameters at runtime?...
I am trying to access a web service that has parameters (three of them, all strings). But I want to access this service repeatedly, and drive the thing from a table.
I've got the Foreach Loop correctly getting variables from the recordset I populate from the table. That works and I can run a script with msgbox showing all the correct values being read from the table.
My problem is taking these variables and sticking them in the Name / Type / Value entries in the Input tab of the Web Service Task. There doesn't seem to be any mechanism for dynamically updating these at runtime, and if there isn't, that is a HUGE hole in the product. Who accesses Web Services with the same parameters every time?!?
No doubt you know this by now Lazamataz but this can't be done. you're right, it IS a hole in the product!
-Jamie|||
I'm trying to do this to...
Is there a way of accessing web service parameters through a script and the runtime / tasks?
|||Absolutely, yes. Buy Donald Farmer's book (available at the usual places). That has a downloadable chapter that shows you how.
-Jamie
Wednesday, March 7, 2012
Dynamic where in stored procedure help
I have a web application that has a search engine that returns records based off what the user selects in the search engine. I am currently using coalesce in the where statement in my stored procedure to return the records. For eample,
where field1= coalesce(@.parm1,field1). I don't know if this example is better than building the sql statement dynamically in a parameter then executing the parameter with sp_executesql. Can someone explain to me which is better or if there is a better solution?
Thanks,
JamesYou're on the right track. You'll find a great article at http://www.sommarskog.se/dyn-search.html.|||it is better then dynamic sql
you can use isnull function also|||I think it depends.
My understanding is that with dynamic WHERE clauses, SQL Server does not necessarily always store the most efficient execution plan; in the long run, this can hurt the performance of your query, especially if you have a ton of such dymanic elements in the where clause.
That said, I hate maintaining dynamic sql code.
ou might run some tests and see what you get performance-wise.|||But, on the OTHER hand, rebuilding an execution plan each time may be better for the particular combination of parameters than using the one excution plan that was built the first time for the query. E.g., if there are 10 parameters and the first time through, you enter values for all 10. An execution plan is built. Then, the normal user searches with one parameter most of the time. The original execution plan won't be ideal for that query.
It all depends. I went to a conference where some very good examples of both methods were displayed, profiled, etc. Very enlightening. Test and test some more for your particular case.|||I made some performance tests one day concerning the issue:
http://blogs.x2line.com/al/archive/2004/03/01/189.aspx
Sunday, February 26, 2012
Dynamic value on Tool tip
one is name and other is percentage,
but in web page(front end), only name column is displayed,
when the cursor is focused on the name, it should display the corresponding percentage for that name. ( Like a tool tip).
can anyone help me on this
Quote:
Originally Posted by sajithamol
I have 2 columns in a table,
one is name and other is percentage,
but in web page(front end), only name column is displayed,
when the cursor is focused on the name, it should display the corresponding percentage for that name. ( Like a tool tip).
can anyone help me on this
Check the following link
http://msdn2.microsoft.com/en-us/library/system.windows.forms.tooltip.settooltip.aspx
Friday, February 24, 2012
Dynamic Table Creation/Modification
I'm wondering if there is a control available for creating/modifying db tables through a web interface. I want for users to be able to add/remove, rename, and change the datatype of certain fields in a database table. I've been searching all day online if such a control exists in asp.net but haven't found anything.
The introduction to AJAX video centres around this very idea - he uses a GridView bound to a DataSet which is in turn bound to a SQL Express table. Anyway, you can view the video athttp://download.microsoft.com/download/7/8/f/78f2d61a-74c6-47b6-835c-0d1efa5524af/ScuttGu_asp_net_atlas.wmv. It's a good video to watch, anyway, very informative.
Sunday, February 19, 2012
Dynamic SQL Statement from ASP.net Session Object
The "filter values" determine what data is retrieved, since users onlyhave rights to view specific data. Stored procedures run a querystatement to include "WHERE @.filterValue", and the .net code grabs theSession object's filtervalue, ie "Division = 'Admin'" as the sqlparameter. This works great on the other pages in the application.
But I have not a clue how to grab the filtervaluse Session object and plug it into Reporting Services..
Any help/direction will be tremendously appreciated! I work forthe local sheriff's office and am the "Lone .NET / Reporting Services"Ranger".
Thanks!
Lynnette
So no one has any ideas?
Wednesday, February 15, 2012
Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that
Hey,
I changed the database name in the initial cataloge in the web.config conncetion string so that it now connects to other databas that contains same tables as the old one,but now i am getting that error at the update stmt !
thank u in advance
Hiba
Do you have the primary key and/or unique fields defined in the new database table? The Update command only knows how to update if it has access to a unique field...
This could explain why it worked in the first database but not the new one.