U_T_A's Q&A profile
SQL Server How to Validate Parameters
Hi, I am designing a report using SRS 2000. I want to validate parameters before executing the query. Suppose if user gives a random number for parameter (say Emp ID), i want to display a error message in a textbox "There are no records for the given employee ID" and stop executing query to display employee details in the table. I tried using Visible expression for table IIF(Fields!EmpID = "", False, True). But when I run the report with a random number, an error populated saying "You cannot query a record for no data..." Please suggest me a work around. Regards, Hi, from your description you retrieve all data within one dataset, right So there are two approaches achieve your goal as the NoR ...Show All
SQL Server naives bayes prediction
Hi, I am trying to deploy a Naives bayes network.But in spite of I am getting an dependecy network that relates 3 variables, I've got an classification Matrix where all the predicted values are the same. Counts for nai 1 on [Cod Conceito] Predicted Missing (Actual) 0 (Actual) 1 (Actual) 2 (Actual) 3 (Actual) 4 (Actual) 5 (Actual) 6 (Actual) 7 (Actual) 8 (Actual) 9 (Actual) Missing 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 57578 2499 11292 102 2374 317 80 271 989 2 0 0 0 0 0 0 0 0 0 0 0 3 0 ...Show All
SQL Server Creating a Mobile Application with SQL Server Mobile - FIX
This is a great tutorial and it's a shame one of the more important steps was missed. In the “ Create the snapshot user” section you you find the steps to create the snapshot_agent account. Then in the “ Create the snapshot folder ” section you find the share and folder permissions. However, at no point do the instructions advise you about adding the snapshot_agent to the SQL Server Logins. The result is that agent cannot perform the initial snapshot but you won't find this out until 50 steps later after Step 10 in the section “ Create a new subscription". To get back on track, openthe Object Explorer's Security section and add the snapshot_agent to your logins. Then using t ...Show All
.NET Development Compacting MS Access database from C# code?
Hi! Does anyone have an idea how it's possible to compact and repair an MS Access database using C# The option is avaiable in MS Access main menu but I don't want to do it manually. Thanks in advance. ...Show All
Visual C# Interface & Class Discrepancy with Java
Discrepancy with Java In java if I have interface with 5 methods & if I am not interested to override all the 5 methods then I can create an abstract class and I can implement only few methods. Later I can inherit the abstract class to my original class to override those abstract methods. This is the simple way to use the required function from the interface. When I tried the same logic with C# or J# it doesn’t work. I declared a class as abstract and avoid to implement few methods it throwing a compiler error. &n ...Show All
Windows Forms Creating my own TabPage class
I have a tabcontrol on a form. If I add tab pages and add controls to them in Visual Studio the controls become members of the main form and the main form will also handle all events from all controls on all tab pages. I want to create my own TabPage class that handles everything that happens in the TabPage to avoid having all code in the main form. I created MyTabPage class by adding a new Component to the project and changing the base class to TabPage. I am able to drag stuff from the Toolbox onto my TabPage in Design mode. In the designer for the main form I added another tab page to the tab control and changed the type from TabPage to MyTabpage in the main form code. However, I am not able to see any controls in the tab when I ...Show All
Visual Basic Opening files
Can someone please tell me how can I open one file from one command button Thanks, Xico you can use a StreamReader to read the file contents, or you can also use My.Computer.FileSystem.ReadAllText. Example: Dim theFileContents as String = My.Computer.FileSystem.ReadAllText(" filename.txt ") this would read the entire file contents to a string variable. it depends on how you want to read the file, either in string or as raw bytes. to use a StreamReader, import the System.IO namespace then: Dim theStreamReader as new StreamReader(" FileName.txt ") Dim theFileContents as String = theStreamReader.ReadToEnd() theStreamReader.Close() both pretty ...Show All
SQL Server Install path SQL Enterprise Manager
Hi, We want to install SQL Enterprise Manager on a seperate server. Our provider for this server requires us to install SQL EM on a non-default drive/path, d:\programs. How can I achieve this TIA, Wim Looks like this works for 2005. However we want to use 2000. My mistake, should have mentioned this. We already looked quite extensively on the CD but could not find any clues for resolving this. Does anyone have an idea It could be that Enterprise Manager 2000 is not meant to be installed seperately from SQL Server 2000. Can anyone say anything about this TIA, Wim. ...Show All
Visual C++ ADO Connection object
Suppose I develop HTTP ( or some another ) server. Can I use single Connection object for many requests ( many threads ) or I should use MS ADO pooling mechanism and create new Connection (or Recordset with implicit Connection) every time You should use a pooling mechanism with the creation of a number of Connection (Array of). The access should be managed via Mutex and/or semaphores. Regards ...Show All
Visual Studio Express Editions Process commands
Hi, I am writing a program that will start a program at a certain time (I have the time thing working) with parameters And at another set time either send that process a command OR end it Are either of these two possible Cameron. well you use the Process class in the System.Diagnostics namespace to run a process, or its assistant the ProcessStartInfo class, which has additional flexibility like redirecting input/output from the application you are going to run and setting the working directory and setting the window style etc... http://msdn2.microsoft.com/en-us/library/system.diagnostics.process.aspx http://msdn2.microsoft.com/en-us/library/system.diagnostics.processstartinfo.aspx ...Show All
Visual Studio 2008 (Pre-release) Playing wav file using MediaElement
Hi, I am trying to play a simple wav file but it doesn't seem to work (no errors just no sound comes out). Even the examples in the SDK don't work. Is anyone else experiencing this This is the code I am using (on Beta 2): <MediaElement Name="myMediaElement" /> <Button Margin="100,20,20,0" Width="200" HorizontalAlignment="Left"> Click for Ringing Sound! <Button.Triggers> <EventTrigger RoutedEvent="Button.Click"> <EventTrigger.Actions> <BeginStoryboard> <Storyboard> <!-- Sound wave from this source is played when the button is clicked.--> <MediaTimeline Source="media\ringin.wav" Storyboard.TargetName="myMediaElement" /> </Storyboard> </BeginStoryboar ...Show All
SQL Server CURSOR Select clause
I need to dynamically construct the field order of a cursor based on fixed labels from another table, but when I put that resulting query I receive the error: Server: Msg 16924, Level 16, State 1, Line 78 Cursorfetch: The number of variables declared in the INTO list must match that of selected columns. I have 6 fields defined in the cursor select, and 6 parameters in the fetch. The results of running the @sql portion returns valid data. Should this be possible to define a parameter containing the select clause of the cursor select colnum, coldesc, colname into #ae_defs from ae_adefs select @Sql = (select colname from #ae_defs where coldesc = 'PATIENT NAME') + ', ' + (select colname from #ae_defs where coldesc = 'PATIENT NUMBER') ...Show All
.NET Development taking id of current node???
i have an xml file for my announcements; and when user click edit button i must take it id of current node because i must forward this to my editannouncement function for edit its context; so how can i take current node id for forward this id for example;; textbox1.text = annTitle; textbox2.text = annBody; id class1.editannouncement(int annID, string annTitle, string annBody); so edit announcement takes this id and find this announcement from xml file and edit it; Then take text value of this node. You can take text value of XmlElement node with InnerText property. http://msdn2.microsoft.com/en-us/library/system.xml.xmlnode.innertext.aspx ...Show All
Visual FoxPro how to check for your prg running?
heres my prob. when you launch my application and minimize it and then try and launch it in a second screen you get alot of errors. how can i check if the program is already running so i know to cancel the prg right away if it is alrdy running Yes I mean pre2K (and we have many customers using win9x,winNT it's frustrating for me to always seek a method that would work on those machines too - meaning even with winAPI I have to choose carefully:( ). ...Show All
Visual Studio Tools for Office Making a custom installer
Hi I need information about making a custom installer, I can't get it to work. The installer installs the application at a certain location and it also installs the registry entries. I've have also set the add-in to be fully trusted. The add-in is for powerpoint. // Lasse Hi Ashish, This article will explain how to add the pre-requisites and a custom action for setting security to your setup project. http://go.microsoft.com/fwlink/ LinkID=57779 Regards, Darryn Lavery [MSFT] ...Show All
