snibbets's Q&A profile
.NET Development Problem with com to .net interoperability
I'm working on a project for time attendence control in which i have to use ActiveX control Starinterface.ocx. I'm using AxImp to generate wrapers AxStarnterfaceLib.dll and the standard one StarinterfaceLib.dll, then i've added reference to them using project/AddReference. The problem is that when i'm trying to give instance to metods from control for example : public void _CommPortOpen(){ StarinterfaceLib.StarInterfaceClass ax=new StarinterfaceLib.StarinterfaceClass(); ax.CommPortOpen("COM1",9600); } the exeption is throw: System.Runtime.InteropServices.COMException was unhandled Message="Catastrophic failure ...Show All
Windows Forms Custom SaveFileDialog
Hi, I have and application that can save the same data in both binary or ASCII, this work well. but what I don't really like it's that I actually use to different button to save in my application. What I wish is to use a single SaveFileDialog and extend it to add two checkbox in it, one for ASCII and one for binary. After that, the ...Show All
.NET Development Parsing data from MSQL to TextBox
ok I have the following code System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection("SERVER=localhost;DATABASE=test1;UID=username;PWD=dbpassword"); System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand("SELECT * FROM tbl1 WHERE IDNum = '"+txtIdNum.Text+" LIMIT 0, 1', conn"); System.Data.DataSet ds = new System.Data.DataSet("MyDataset"); How would I parse the result of the query to a textfield (Lets call the textfield txtbox2) I have added the LIMIT into the query, so I only get one responce Thanks in Advanced System.Data.SQLClien ...Show All
Visual Studio 2008 (Pre-release) Cannot download Expression Graphic Designer
If this is the wrong place to ask, I appologize. I am trying to download the Expression Graphic Designer from this location http://www.microsoft.com/downloads/details.aspx familyid=565CAFC7-343F-4927-ABD1-8BBF6E7E01DE&displaylang=en and when I try to register for downloading, the Microsoft Passport Network issues an error: We're unable to complete your request The Passport Network is experiencing technical difficulties. Please try again later. The page is unavailable or no longer exists The page you're trying to find is either temporarily unavailable or no longer exists. Please do one of the following: ...Show All
SQL Server sum a calculated field - "varying data types"
I want to report voided transactions as 0 amounts rather than as the original amount of the transaction, and then sum the column. I have created a calculated field - =IIF( Fields!Void.Value ="Y",0,Fields!Net.Value /2000) I formatted the column as n2. But when I try to sum the column for this field I get this error message - The value expression for the textbox ‘CalcNet_1’ uses an aggregate function on data of varying data types. Aggregate functions other than First, Last, Previous, Count, and CountDistinct can only aggregate data of a single data type. The field Fields!Net.Value sums just fine ...Show All
Visual Studio Publishing project with MSBUILD
I am running msbuild on our build server, the server has the .NET v2 beta 2 runtime and SDK installed, it does not have DEVENV installed on it. When I try to publish the project with msbuild from the command line on my local PC that has DEVENV installed it all seems to work. When I try running the some command on the build server I get: “C:\WINNT\Microsoft.NET\Framework\v2.0.50215\Microsoft.Common.targets : warning MSB3482: SignTool reported an error 'SignTool.exe not found.'.” The command line I am using is: %windir%\Microsoft.NET\Framework\v2.0.50215\MSBuild.exe StudentAllocator.sln /p:Configuration=Release /property:ApplicationVe ...Show All
Windows Forms Customizing StatusBar Control
I am creating a custom StatusBar control which houses a ProgressBar control. How can I show all the properties of embedded ProgressBar control on design time I want the property window of StatusBar control, shows all the properties of the progress bar. In this case, the object you are working with is a standard ProgressBar. The Propert ...Show All
Windows Forms DataGridView master detail over intersect/junction table?
DataGridView master detail with one-to-many tables is fairly straight forward, but how to do master detail when going over an association/junction (many-to-many) table Thanks Does the Northwind database have a sample set of tables that mimics your scenario It will help me get a better idea what you are trying to do. -mark D ataGridView Program Manager Microsoft This post is provided “as-is” ...Show All
Visual Studio Express Editions How do I get my free e-books?
I downloaded, installed and registered the beta editions before Nov. 7th. I have yet to get an e-mail though telling me how to access my free e-books. I have a benefits page where I can download icons and pictures but nothing about e-books. Anyone know what's going on Thanks. Since no one is replying I'm guessing everyone else has their e-books If so how did you exactly get to them ...Show All
SQL Server Error using Datareader Destination
Hi guys, I'm in dire straits here - really hoping someone can help me. I'm using a datareader destination and consuming it in a C# app. When I fire ExecuteReader on my DTSCommand object to return some data I get the error: "Could not obtain a datareader object from the specified data flow component" So we don't have a clue why this isn't working. Although...I'm intrigued by the line about "specified data-flow component". In the C# app you don't actually specify which data-flow component contains the data reader that you want (do you ) so how does it know where to find the datareader I'm speculating as to whether this is something to do ...Show All
Visual Studio Tools for Office Office automation - getting a built-in constant with late binding from .NET
Hello everybody, Because my application has to target multiple versions of Office I've chosen to use late binding. I don't want to hard code the constants (for example Outlook.OlItemType.olMailItem) but to get them at runtime through late binding. How could I do this from C# or Visual Basic .NET Best regards, Gabriela Babriela, you can do this by using reflection. Here is a sample. BTW: you need to use FlattenHierarchy to make things like constants appear (I wrote this example about glass, because I have a brother-in-law who is an ...Show All
.NET Development Switching Connection strings
In my app_code folder I create a dataset (customer.xsd). The wizard prompts to create or choose a connection string. Now, I have two strings in my web.config file - one for production machine, one for dev machine. In my code, I DIM a New datatable and a tableadapter for my dataset. I then call the getdata() method that the tableadapter wizard created for me. However, I can find no property for connection. In VS2003 I used to set an application variable in global.asax.vb that determined which string to use based on Context.Server.MachineName. I could then use that app variable to set the connectionstring property. Can't do that here. ...Show All
Windows Forms Gridview validation problem
I have a integer column on a gridview of a webform. The problem is that the user can put in a character (like an "A") in the field and when the update button is selected the user gets an ugly message. What is the best way to deal with this problem Hi WoodrowS, I am assuming that the column where the user is entering an integer is a template column. To validate a user input for an integer you need to use compare validator control. I have given a sample gridview below that contains a template column and compare validator control. Particularly look at this item template section: you nee ...Show All
Visual C++ Error: LNK2019
Hi I am using MS VC++ .Net (2003) and MS DirectX 9.0 SDK (December 2004). I am getting the following error :- GDPass error LNK2019: unresolved external symbol "public: void __thiscall bullet::gunshot(void)" ( gunshot@bullet@@QAEXXZ ) referenced in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" ( WndProc@@YGJPAUHWND__@@IIJ@Z ) "gunshot()" is a function which is declared in a header file, as a public function of a class. Its definition is in the same source file as the function call. I cant seem to understand the reason behind this error. Please help me. fixed tha ...Show All
Visual Basic VB.Net and Access Question
I am trying to learn how to use access and VB.Net in conjunction with each other. I have a few books regarding them but all i want to learn initally is how to add, edit and delete in vb.net. But the books, even though one is actually called Simply VB.Net, dont seem to show any structure as to how this should be done. Can anyone illustrate to me exactly how an item can be added to a database from various textboxes on a form in vb.net. Can someone show me what structure the code should take and even give me some sample code if possible. Anyone helpin me would be a BIG help. Any books that can help me learn this if you can let me know i w ...Show All
