Eric F. Kaufman's Q&A profile
Visual C# Running C++ from a C# app (.NET detection)
I have a c++ script which detects if .NET is installed and what version. I would like to put this c++ script in a C# .NET app so every time someone tries to start the C# app, the c++ code is run, and then the C# app is started if the c++ code returns true. Can I use the c++ code in the C# project Or does this code need to be based outside the project, and it will have to trigger my C# app My only goal is to give the user a nice Message if they try to start my C# app and .NET is not installed. If someone knows a better way to do this please let me know. Below is the header for the c++ function I want to run. The code is by Aaron Steb ...Show All
SQL Server Scrpting to genrate surrogate keys
This is the code iam using to get the incremental surrogate keys: Imports System Imports System.Data Imports System.Math Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper Imports Microsoft.SqlServer.Dts.Runtime.Wrapper Public Class ScriptMain Inherits UserComponent 'Declare a variable scoped to class ScriptMain Dim counter As Integer Public Sub New() 'This method gets called only once per execution 'Initialise the variable counter = 1093 End Sub 'This method gets called for each row in the InputBuffer Public Overrides Sub Input_ProcessInputRow(ByVal Row As InputBuffer ) 'Increment the variable counter += 1 'O ...Show All
Windows Forms Type comparison
I want that all tabControls which are on forms that inherit from my childwindow, are always set to the first tab, when activated. So I wrote the following code into the OnActivate trigger of my child window: // BEGIN CODE private void ChildForm_Activated(object sender, System.EventArgs e) { System.Windows.Forms.TabControl tabControl = new TabControl(); // Not really needed ...Show All
Visual FoxPro Parameter Query
I have a date field that has the hire date for an employee. I have built a search form & I would like to be able to have users search for the hire date within a time frame. (i.e. 04/01/04 and 04/30/04). How would I do this In Access I would be able to put the "between" clause in the criteria field in the query designer. I am a newbie to VFP & have NO CLUE how to do this. Thank you!!! Got it to work. ...Show All
SQL Server 2005 April CTP Install Failure
SQL Server Setup could not conect to the database service for server configuration. The error was: [Microsoft}{SQL Native Client} Named Pipes Provider: Could not open a connection to SQL Server [2]. Refer to server error logs and setup logs for more information. For details on how to view setup logs, see "How to View Setup Log File" in SQL Server Books Online. That is the error when attempting to install to W2003 running as a VPC2004 guest OS. The framework and VS Beta 2 are installed and functional. During setup I recall no configuration option that required the use of Named Pipes. For the most part I used all d ...Show All
Visual C++ Use of HTREEITEM in /Clr
HI, When compiling an app that uses HTREEITEM i get an error complaining about _TREEITEM - _TREEITEM does not seem to be defined. I am currently trying to see if this will work: typedef struct TVITEM *HTREEITEM; Any hints on how to get around this I can confirm that the use of typedef _TREEITEM {}; solved that problem. I have not tried fiddling with the Lean and Mean def's as it seems inconsistent to do so. If afxcmn.h is included then the typedef above should occur regardless. The code uses #define VC_EXTRALEAN - it is quite diverse, but is mainly client side DBMS using ODBC with common controls. Thanks... - Tim ...Show All
SQL Server DMX Query
Hi, I am having a DMX Query as follows. SELECT [Englishproductname],( SELECT $TIME, [Profit], PredictVariance([Profit]) FROM PredictTimeSeries([Profit],5)) FROM [ProductSales_Forecast] It displays as English productname and the Expression as columns. The expression consists of time, profit as nested one. I need to have no nested queries. I want englishproductname to repeat for all the columns inside the expressions. I don't want to display as expressions. Repeatation is not a problem for me. Plz help in this regard. Tx in advance Have you tried : SELECT FLATTENED [Englishproductname],( ...Show All
Windows Forms Changing component size on windows resize
I can't remember this one from my old days of Windows programming. I want to change the width of an object when the form size is changed. How do you do this No wonder you're an MVP Ken! That worked like a charm! I'm glad someone can help an ignorant windows forms user like myself! ;) ...Show All
Visual C++ function malloc()
Hello everybody int* p; p=(int *)(malloc (10 * sizeof (int) ) ); the above statements tells the c compiler that we wnat to store 10 integer values. it is just like that int a[10]; Means the last value that can go in p[9] if indexing is starting from p[0], just like a[0] to a[9] But in p we are able to store value at location p[10] and even in p[100] WHY For example int *p,i; p=(int *)(malloc (10 * sizeof (int) ) ); for(i=0;i<=1000;i++){ p =i; } The above code runs well in vs 2003 but i think it has to give error at p[10] Please tell what is it happening Thanks In C (and C+ ...Show All
Visual Studio Express Editions VBExpress2005 - "There is no editor available" with "Unable to open module file"
I know this has been posted a few times before, unfortunately, none of the 'resolutions' have worked for me. Situation: I am running Visual Basic 2005 Express on a Windows 2000 Pro system (current service packs/updates). I created a program with two forms. Form1 is the main program, Aboutbox1.vb is a Help About form. I created the program, compiled, and it was working great. I published the project, then it happened. Form1, when clicked says "There is no editor avaliable for C:\docum...\Form1.vb. Make sure the application for the type (.vb) is installed." Meanwhile in the error list it reads: "Unable to open module file 'C ...Show All
Visual Studio Repair missing Project assignment / links
In my SourceSafe I got many Items that get deleted when I run a repair task. * When I look at the property->links info it is empty, * When I look at the proberty->path info it says "***Deleted*** 1->1" Is there any way to repair those items and restore the project/link assignment The repair task simply deletes all those files Is this list completely empty or have just one record in it Do you still have empty Links list after running “Analyze –f” If so then something is wrong with Analyze utility. It would be great if you could share the database with us assuming you ...Show All
SQL Server Sql Server Management Studio problem updating table values
In Management Studio, I right click the table name and select "Open Table". Then I try to manually edit data in the table. I get the error: --------------------------- Microsoft SQL Server Management Studio --------------------------- No row was updated. The data in row 17 was not committed. Error Source: .Net SqlClient Data Provider. Error Message: String or binary data would be truncated. The statement has been terminated. Correct the errors and retry or press ESC to cancel the change(s). --------------------------- OK Help --------------------------- I have one column containing text data in the table. If I dele ...Show All
Windows Forms Tabcontrols
I have dropped a tabcontrol on a standard windows form. My purpose for the tabcontrol is to hold shipping addresses for a customer. So, if there is one shipping address there is one tab. If there are two shipping addresses there are two tabs. I want to have textboxes to hold the shipping information on the tabcontrol. However, I don't want to have new textboxes for each tab. I want to reuse the exact same textboxes on each tab that is added and simply populate each textbox from the database. Currently, if I run the program the textboxes only appear on the tab on which they were placed in the source code. I need to make the textboxes ...Show All
Visual Studio Install MSDN documentation but Missing Visual Studio Help
I installed SQL Server 2005 server, then Visual Studio 2005. Studio asked for the MSDN which I installed (Oct 2005 Library I believe, hmm, maybe I should look for a later one ) Anyway everything installed no errors but when in VS and select help (set up for external help window) there is no help for Visual Studio, only for SQL Server 2005. Any suggestions on how to get ALL the help available. Thanks, Jim Did you install the help that came with the VS CDs (There should be 3 MSDN CDs). ...Show All
.NET Development Can .NET 2.0 Application use .DLL compiled in .NET 1.1?
Hi all, If I have a bunch of business objects that where compiled in .NET version 1.1, would it be possible for my application (done in .NET 2.0) to pick up these objects (.dll file) and start to using them (Would be great if some-one could provide some form of documentation on this) Thanks Tryst You definitely can, I don't have links to documentation but try msdn2.microsoft.com which is the .net 2.0 documentation. ...Show All
