I have a stored procedure that retrieves SQL queries as text and executes the statements using sp_executesql. Each of the dynamic queries is a count query in that it only returns the number of records found (select COUNT(id) from...). I am looping through a set of SQL queries stored as text and building a table variable out of the results. At the end, I am selecting all the results from the table variable as the result set that I want returned from the stored procedure. However, when I execute the stored procedure, I am naturally getting multiple result sets (one for each of the dynamic queries and one for the final select.) Is there any way I can suppress the results of a select statement executed through sp_executesql? I have found answers that reference storing the results in a temp table, but I don't have control of the query text that I am running so I can't change it to select into anything. Please help. Thank you for your time.
I have an ASP.NET page with a jQuery dialog that is displayed to change some data. I am setting up the jQuery dialog so that when the user clicks the OK button it calls ASP.NET's
Page_ClientValidate('validationGroup') via javascript, finds all the invalid controls and changes their CSS class. So here's the scenario: the user opens the dialog, keys in some invalid data, clicks OK (receiving the validation messages), and then clicks Cancel.
Now the dialog is closed, but the validation messages are still there, so that when they open the dialog again, the data goes back to the way it was initially, but the form is still in the invalid state (the validation messages are still displaying).
What I need is a "reset" function of sorts to call after calling Page_ClientValidate('validationGroup'). Does this exist?
This probably isn't the best way to do what I want, but I can't think of anything else to try...
NB: I'm using Visual Basic.NET
My form has 2 DataGridView controls. One of these is bound to a DataSet, the other isn't visible - at least not until the user selects a uniqueidentifier cell in the 1st grid.
When the user makes this selection, the 2nd grid will become visible and display the row from another with the same id as the one selected in the 1st grid.
So, basically, I want to dynamically display data in one grid based on user selection in another grid.
My code looks like this so far...
Private Sub RulesGrid_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles RulesGrid.CellClick
Try
FlagsGrid.Visible = True
''// MsgBox(RulesGrid.CurrentCell.Value.ToString())
Dim sql As String = "SELECT * FROM ctblMKA_Status_Flags " + _
"WHERE intStatusID = '" & RulesGrid.CurrentCell.Value & "'"
DSFlags = GetDS(sql)
DSFlags.DataSetName = "FlagsDataSet"
FlagsGrid.DataSource = DSFlags
ProgressBar.Visible = False
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
I feel like I'm missing something here... Any ideas anyone?
I set up various global parameters in Global.asax, as such:
Application["PagePolicies"] = "~/Lab/Policies.aspx";
Application["PageShare"] = "/Share.aspx";
Application["FileSearchQueries"] = Server.MapPath("~/Resources/SearchQueries.xml");
...
I have no problem accessing these variables form .ascx.cs or .aspx.cs file -- ie. files that are part of the Web content. However, I can't seem to access 'Application' from basic class objects (ie. standalone .cs files). I read somewhere to use a slight variations in .cs files, as follows, but it always comes throws an exception when in use:
String file = (String)System.Web.HttpContext.Current.Application["FileSearchQueries"];
We have a report that compares data between weeks, and it seems like this is the exception and not the rule in the reporting world.
I'm looking for an elegant way of selecting "a week" in a Silverlight control. I'd prefer not to spend the time building it ourselves, so it would be nice if I could buy a well polished control that does this.
Sure, I could use a drop down list, but I would like a way to easily navigate through potentially years worth of weeks. Any existing controls out there? Any clever ways of using basic controls to achieve our goal?
Thank you!
I need to run a macro in Word with a parameter. I've tried to declare a parameter for the module in the VB Macro Editor but it doesn't work - the macro will be invisible in the macro list when I do so. I don't know how to do this and whether it is posible to do so or not in MS Word 2007.
Please help.
At far as I know, at the moment we can call other targets from within a target by using the attribute 'DependsOnTargets' or by using the task
My question is when should we use each case?
I've created a window that has some containers and widgets in it, and I want to add a new widget dynamically at run-time to one of the Vboxes in this window. So I have this code, which brings up the window:
gtk_builder_add_from_file( g_builder, "window.xml", NULL );
mainwindow = GTK_WIDGET( gtk_builder_get_object( g_builder, "window" ));
gtk_widget_show( mainwindow );
Then I create a new label, for example, and add it to one of the existing Vboxes, called "vbox_mid", like this:
label = gtk_label_new( "Test label" );
vbox = GTK_WIDGET( gtk_builder_get_object( g_builder, "vbox_mid" ));
gtk_box_pack_end( GTK_BOX( vbox ), label, TRUE, TRUE, 0 );
But this doesn't seem to work. I don't see a new label in the vbox. I have a feeling I'm missing something here, but I can't see what it is. I thought perhaps there was a special GtkBuilder call to add a widget dynamically, but I don't see anything that looks like that. I would really appreciate any help on this.
I'm looking for a very basic slideshow which displays images of various sizes. For example, the first image could be a standard 800x600 but the next might be a taller portrait image and so on. The slideshow doesn't need to have any controls. The specification just states that the page will be black and in the centre there'll be the area where images will display. As far as I know, it will be very simple like this - www.jeffcutter.net. I'm limited on time here so I'm not able to look into writing a custom one or anything like that. I just need to get some images displaying like in the example.
Thanks in advance, it's much appreciated.
Have a great weekend!
Regards.
I'm trying to learn Objective-C for xcode.
I was wondering if there was an open source depository for custom classes.
Things that programmers re-use.
( ie. playing card class, or peer to peer methods )
I've searched google, but so far haven't seen any type of site.
Does anyone check the domain of an email address as part of their verification steps? eg. Confirm that gmail.com exists if the user specified [email protected] as their address.
I'm curious if there is an efficient way to wait for the front page of a site to load, and then pre-load CSS and script files that I know will likely be needed for the other pages on the site.
I want the front page of the site to be as fast as possible (lean and mean). It's likely that the user will not immediately click on a link. Since there will likely be some idle time, this seems like an opportune time to pre-load some of the external assets. Pre-loading should cause them to become cached. When the user does click on another page, the only request needed will be for the content and possibly some images, etc.
Has anyone done this?
Is it a bad idea?
Is there an elegant way to implement it?
What's the easiest way to set the font sizes for ALL telerik control to a single value? I believe you can control fonts by modifying the CC of a specific control, but that's a pain because I am using many different control types...
I wanna write but \n seems not to be working. What should I replace \n with?
(I read in the books they said that to print @ and % we use %40 and %25, so I guess the should be a number for the new-line).
Any suggestions? Please help!
I've been away from GUI programming for quite some time so please pardon my ignorance.
I would like to attempt the following:
Write a Mac OSX app but still be able to port to Win/Linux (i.e. C++ core with Obj-C GUI)
Avoid Qt/other toolkits on OSX (i.e. talk to Cocoa directly - I feel that many Qt apps I use stick out like sore thumbs compared to the rest of my system)
Not as important, but it would be nice to avoid Visual Studio if it means I can have the freedom to use newer C++ features even on Windows if they help create better code.
I believe this configuration might get me what I'm looking for:
Core C++ Static Library
OSX GUI (Cocoa)
Windows GUI (Qt+MinGW?) OR (no new C++ features, Visual Studio + ManagedC++/C#/????)
Linux GUI (Qt)
Once again, sorry for my ignorance but is this possible? Is this sane? Are there any real-world open source examples accomplish something like this?
I wanna write but \n seems not to be working. What should I replace \n with?
(I read in the books they said that to print @ and % we use %40 and %25, so I guess the should be a number for the new-line).
Let's say I need to create a new file whose path is ".\a\bb\file.txt". The folder a and bb may not exist. How can I create this file in C# in which folder a and bb are automatically created if not exist?
I have a script snippet looks like below:
<ItemGroup>
<files Include="*.txt"></files>
</ItemGroup>
<Message Text="@(files)">
<ItemGroup>
<files Include="*.xml"></files>
</ItemGroup>
<Message Text="@(files)">
I want that in the second Message output, only *.xml is printed. Currently both of *.txt and *.xml are printed which is what I don't want to.
So, my question is how can we overwrite the item files in the second print script? Please help!