Speedie's Q&A profile
Windows Forms How to change a sql string "on the fly"
I am using vb.net 2.0 visual studio professionel. In my dataset i have a sql command that look like this: SELECT jumboId, nr, navn, tekst, aar, dato, pic FROM tblJumbo ORDER BY nr created with the TableAdaptor configuration wizard. I wonder, is it possible to change that string, or add a new one, when the program is running It is called like this: .TblJumboTableAdapter.Fill(.JumboDataSet.tblJumbo) If i want to change the select command to: SELECT jumboId, nr, navn, tekst, aar, dato, pic FROM tblJumbo WHERE nr = 2 ORDER BY nr (This is only a simplified eksample, the real one is much more complicated). The string is depending of the users choise. Anybody know how to do this Maybe i am blind, i just can seem to ...Show All
Microsoft ISV Community Center Forums Application.File Search.
Hi, If any one has a work around for Application.File Search in Excel 2007 please let me know. This is currently not working in Office 2007. Regards, Digambar. Here is a procedure I originally copied from a forum post by Bill Manville. It starts in the directory D:\TEMP, but you can change that, the procedure uses Dir recursively to put the files into an array for further manipulation. Dim aFiles() As String, iFile As Integer Sub DoIt() iFile = 0 ListFilesInDirectory "D:\TEMP\" ' change the top level as you wish MsgBox iFile & " files found" End Sub Sub ListFilesInDirectory(Directory As String) Dim aDirs() As String, iDir As Integer, stFile As String ' use Dir fu ...Show All
Visual Basic 2005 Compiler not recognising code changes
Ok you guys, I know this is probably going to be something really simple so I apologise in advance. I've recently converted a vb.net 2003 solution to 2005. everything is great and I've got rid of my pre-compilation conversion errors and warnings etc and am reading to carry on development. My problem is this - in a sub project (which is referenced in the main solution by the sub projects DLL file, but I also change the source code for the subproject whilst in the main solution (hope that's clear!)), when I change or add to the source code (in the sub project) and start debug, or even rebuild the whole solution, the new code doesn't get picked up. I've tried putting a breakpoint in the code, and it doesn't pick it up, so i tried typing " ...Show All
.NET Development Object Methods not available using .NET Remoting
Hello: I'm taking my first stab at .NET remoting and I'm running into some issues.First of all, here is the object that I would like to be made available remotely: namespace MyClass1 { public class MyClass { public int Add( int a, int b) { return a + b; } } I compiled this class into a library that my Remote server (host) references (The assembly is not in the GAC, just on a local directoy). Here is the code that I have for the host. (I've removed all the using statements, but all relevant namespaces are referenced, and added to the project as a reference) namespace RemoteHostApp { class Program { static void Main( string [] args) { ChannelServices ...Show All
.NET Development Selecting / Update records - Concurrancy
I'm new to Visual Studio 2005 (Visual Basic). I'm an Oracle guy but I do allot of development in MS Access. I don't want to use ADO.NET's generic behaviour for record locking, etc. What I'd really like to do is to have the same behaviour as Access has where if a user changes a field, the database locks the record. I was wondering if you had any sample code that would allow me to set up a form that has a combo box on the top of the form where the user selects a record. Then the database fetches the row and displays the data on the screen. If the user changes the data, the form locks the record. What's the best way to accomplish this I've heard that this can be accomplished using transaction control but I haven't found any form / ...Show All
SQL Server Questioning my approach to generating aggregations
Hi, I'm using the aggregation wizard to build my aggregations. Due to my not having much data in my development environment the wizard acutally produces zero aggreagtions. I know that there will be much more data in the production environment although I don't know how much. Hence, I go into the 'Specify Object Counts' page and set the number of records in my fact table to an arbitrarily large number (usually 1000000) and this results in some aggregations getting produced by the wizard. The issue I have with this is that perhaps I am producing too too MANY aggregations. Other than the obvious issues of: Increased disk usage Increased processing time is there any other issues around building too many aggregations Any ...Show All
Visual Studio Control+C (user break) handling disabled when program launched from Tools menu
I have a C++ Win32 console program in which I trap Control+C (SIGINT) with my own handler. This works just fine when the program is started from within Visual Studio 2005 using the menu items Debug\Start Debugging or Debug\Start Without Debugging, or when the program is started outside of Visual Studio. However, if I use Tools\External Tools to create a tool that starts the program, and if I start it using that, my handler no longer gets called. This is a big problem because many users of my program use Visual Studio 2005 and start my program from the Tools menu. Does anyone know how to solve this problem Thanks, Jim Hi Ayman, Yes, it is still a problem for us. Since I haven't recei ...Show All
Connected Services Framework WES Sample - Issues
Hi, I'm working on CSF 3.0 Dev version. I'm trying to develop WES Adapter over HellowWorld Service. When I looked at the WES Toolkit sample which is shipped with Dev version, It is not an Adapter over any sample service. Whenever client sends a request WES returns the response from the stored xml files. Let me explain my scenario: I have a WES Adapter over HelloWorld Example. Using Health monitor WES need to aware the availability of HelloWorld service. So that client can easily take a decision using interating with WES adapter only, rather than directly intreracting with HellowWorld Service. My Question is 1. How to design WES Adapter for this scenario ( For ex. Send a request to HellowWorld Service (any method ) and wait f ...Show All
Visual C++ read excel cell
hi there, i try to read a excel cell value. and i don't know how. i can open the excel file but after that.... maybe you can help me. i try to read the value and show it in an edit field. i am using visual studio c++ 6.0 ; excel 2003 i included all excel.h classes. here is what i tried so far. greetings daniel void CAutoProjektDlg::OnGetvalue() { // Commonly used OLE variants. COleVariant covTrue((short)TRUE), covFalse((short)FALSE), covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR); _Application app; Workbooks books; _Workbook book; Worksheets sheets; _Worksheet sheet; Range range; Font font; Range cols; COleVariant Data; int Value=0; long cell; long *pcell = &ce ...Show All
SQL Server Problem with the INFORMATION_SCHEMA.COLUMNS column
Hi I have written thing query to check some value in the database but it doesn't return any values on the --set nocount on select @res = coalesce ( @res + ',' , '' ) + ' [' + COLUMN_NAME + ']' FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = @columnnameT --AND COLUMN_NAME LIKE @columnnameT2 --AND COLUMN_NAME like '%[^_ID' Print @res Set @Params1 = N 'Select ' + @res + 'from [' + @tablename1 + '] where ID = ' + @fieldname1 + '' Print @res My all query is CREATE TABLE #Results ( i int identity , DBName varchar ( 450 ), TableName nvarchar ( 450 ), ColumnName nvarchar ( 450 )) use master go --set quoted_identifier off declare @columnnametosearch var ...Show All
.NET Development Do I need to wrap HttpListenerResponse.Close()/Abort() in try/catch?
Hi all, A simple question that I cannot seem to google an answer for: I have an application (.net 2.0) that makes use of HttpListeners, and I want to know if I should wrap every call to response.Close() or response.Abort() in some exception handling. Or put another way: how can I find out what exceptions HttpListenerResponse.Close() and Abort() methods possibly throw In an even more general sense, is there a resource somewhere that lists the possible thrown exceptions for methods in the framework libs Thanks! idan AT volicon DOT com But... Do they need exception handling at all I want to know if I can do try { // do some stuff here with the response object } catch (Exception e) { Console.Out.WriteLi ...Show All
Visual Studio 2008 (Pre-release) wcf or wse3.0
I have a simple but deciding query. I need to implement web service security(message level). Should i use WCF or WSE3.0 for this.Which one is latest. Also is the release version of WCF out.If yes, its version number please. Regards we do have pre-defined binding WSFederationHttpBinding that provides the way in WCF for WS-Federation protocol. click on http://msdn2.microsoft.com/en-us/library/system.servicemodel.wsfederationhttpbinding.aspx for more info WCF also have a concept of federated security which might be of your intrest too regards Nishith Pathak MVP-Connected System Developer Http://DotNetPathak.Blogspot.com ...Show All
Visual Studio 2008 (Pre-release) Anyway to change WindowsFormsHost z-order to show other WPF controls on the same window?
It appears WindowsFormsHost control are alway set to display on top. Is there any way to change its z-order to allow other WPF controls on the same window to be visible on top of the WindowsFormsHost(ed) controls Funny I just saw this question...here's my answer in this thread ...Show All
Software Development for Windows Vista MPEG4 Playback: Video RenderEx Error(Error code is 0x80040231)
hi all: when I use RenderEx to render my filter, it reports the error code(0x80040231), it drives me to crazy!!! 1. (My pc likes below : os: xp en hardware: HP 5100) On the pc but not in one process, I call RenderEx for many times ,it runs well; On the pc and in one process, I call RenderEx twice, it reports the error code(0x80040231); 2.(My pc likes below: os: xp en hardware : HP 5000) RenderEx runs well whenever how to use it The error code(0x80040231) means that the filter graph is circular, but i can not understand it and the reason of the error, can anyone tell me Thank you very much! Sorry for my poor english! ...Show All
SQL Server Problem accessing MSDB in a cluster
I'm new to sql clusters, but i've been asked to set up an SSIS job on a cluster. My wish is to import the dtsx package to MSDB, not to "File System". This works fine in my non clustered test environment, but on the cluster, I can't expand the MSDB node. When I try, I get a pretty long error message, I don't have it here right now, but i says something about that the reason could be the lack of a default instance on the sql server. I'm not the one who set up the cluster and to be honest, I don't know how default instances works in a clustered environment. Does anyone recognize the problem A related question. Should I connect to "the cluster" or to the node with SSIS installed when I upload the dtsx package I'm a ...Show All
