_Rej_'s Q&A profile
Windows Forms E-Mail Function
An application I am currently developing requires an E-Mail function. This application will be sent to several clients who do not have the same internet/e-mail provider. I would much rather my program get, set, and use the smtp port on the client's computer within the program instead of accessing their e-mail application and loading it. Are there a ...Show All
.NET Development Code to Access a Template Column in a GridView
What code is used to access a GridView Item Template column to conditionally set the value of a label field contained in it The control names are "GridView2", the column name is "RequiresPWD", and control I need to set to "Y" or "N" is "Labele1". I need to test a SqlDataSource table field for 1 or 0, and set the value of "Label1" to either "Y" or "N" respectively. It is coming from "SqlDataSource2", table "Items", field "RequiresPWD". Thanks Never mind. I figured it out already. ...Show All
Visual Basic Using Visual Basic 6 with CLR Profiling API
I am using the profiling api with Rotor. However, I've found that using C++ to implment COM interfaces is very, very painful. Has anybody created profilers using Visual Basic 6.0 dll's having objects that implement ICorProfilerCallback If not, should this work in theory (writing a profiler in VB6 instead of C++) Does anybody have any idea where I can find a typelib for the Profiling API that would include a definition of ICorProfilerCallback For my application, performance is not an issue, so I don't mind if VB is slower than C++. But, speed of development is very important, and I write code a lot faster in VB than I do in C++. Th ...Show All
.NET Development VB: how to obtain info if DNS ist set by DHCP?
Hi, I'm just writing my real first VB App. I want to gather the network infos of all adapters and change them on the fly... So far I found all needed objects except if DNS is set manually or by DHCP Does anyone know, how to obtain this info...and if so how to change it Thanx a lot in forward, Stephan You can use system.net.networkinformation namespace to gather all the details of the network. You can't set it using System.Net APIs as they are read only as of now. If you need to modify you need to use the IPHelper APIs. It gives you full control ...Show All
.NET Development Beta 2 Inheritence question
Hi, I have question about inheritence under Beta 2. I created a class library for my web application using a new namespace 'MyNameSpace'. And then I created a class named 'MyFirstClass' under the namespace, derived from SqlMembershipProvider (MS Class, under system.web.security namespace). using System.Web.Security; ...................... public sealed class MyFirstClass : SqlMembershipProvider { .................... ................... public override bool ValidateUser ( string username, string password) { return base .ValidateUser(username, password); //error here } .................... ...Show All
.NET Development Open a serial port with Serialport class ..
Hello, I would like to create a little tools to read informations on COM1. I have a form and a text box under. The infos should display in this textbox. I paste on the firm the SerialPort class component. To begin, I just want to test how to open the serial port and simply read the informations. I test this code : ----------------------------------- Imports System.IO.Ports Private WithEvents objPort As SerialPort Dim objPort As SerialPort objPort = New SerialPort ( "COM1", 115200) objPort.ReceivedBytesThreshold = 1024 objPort.Open() ' This event is triggered when the objPort.ReceivedBytesThreshold is exceeded Private Sub obj ...Show All
SQL Server Intermittent Failure of Interdatabase Service with SP-1 CTP
In an SSB test project created from the T-SQL batch in Stuart Padley's Weblog (subtitled "SQL Server 2005 stuff I couldn't find anywhere else", http://blogs.msdn.com/stuartpa/archive/2005/07/25/443229.aspx ) I found strange inconsistencies with enquing messages between two databases on the same SQL Server 2005 Standard Edition SP-1 CTP March instance running under Windows Server 2003 SE SP-1: Sending a simple message from the Initiator to the Target database with either the SendMessageProc stored procedure or its code as a batch fails for about 50% of all tries, with varying failure patters (up to 10 sequential attempts fail ...Show All
SQL Server How to automatically create a partition monthly using xmla with partition name formed by program?
Now we use SQL Server 2005 to develop a DSS for a Telecommucation Cor.We want to create cube partition automatically.Now we find some techniques to do this,including using job in sql server agent in SSMS and to execute xmla as SSAS command.But How to genereate partition name automatically in the xmla that is like 'partition-200603' according to the system date Thank you in advance! I haven't tried this myself, but you should be able to use the SQL Server Integration Services to do this by creating and ActiveX Script Task and generating the appropriate XMLA DDL in the script and assigning it to a package variable and then using a ...Show All
Visual Studio 2008 (Pre-release) scvutil exclude type
How is the syntax for excluding types with scvutil svcutil.exe http://localhost/Service /et:namespace.class doesn’t work. And how do you exclude more than one type Thanks The type must generally be assembly qualified. I believe the syntax is something like: /et:namespace.class,assembly I believe you can also use the /excludeType option multiple times in the same svcutil call in order to exclude multiple types. Daniel Roth ...Show All
Visual Studio Team System Detecting unused code across multiple assemblies
In an older version of FX Cop (a few years ago now), I think there was a public class called Graph. I wrote an app that used this class to detect unused code across multiple assemblies (we have 247 assemblies at present and around 4.5 million lines of code). Is there any current way of performing the same operation with the current version of FX Cop I managed to pull it off quite successfully - the simple answer is to dump any reflection information that is no longer required. Once the method / property is touched by any downstream assembly it no longer needs to exist. This results in a fairly small over ...Show All
Software Development for Windows Vista Creating an instance of IFilter returns E_NOINTERFACE when running in DLLSurrogate
I am trying to get a reference to the IFilter interface of offfilt.dll (Microsoft Office filter) when instantiating the object using a DLLSurrogagte , but I always get back an E_NOINTERFACE error. I can get the IUnknown interface and IPersistFile interface just fine, but not the IFilter interface. All of this works perfectly fine when I instantiate as an inproc server. Anybody have any ideas why this doesn't work Here is my code: hr = CoCreateInstance(clsid, 0, CLSCTX_LOCAL_SERVER, IID_IFilter, (void**)&pIFilter); if (hr == REGDB_E_CLASSNOTREG) //surrogate DLL for out-of-process server not regi ...Show All
SQL Server Combining XML Files
I have to combine two seperate fixed-length flat files into 1 xml file, however, the catch is the 1st flat file (header) can/will be converted to an xml file but if there is another flat file *detail) found, then we must transform that to xml and combine into the header into one xml file. So, the standalone header xml file would look like this: <document> <tables> <header> <rows> <row> <field1>header file 1 info....</field1> <field2>header file 1 info....</field2> </row> </rows> </header> </tables> <document> and i ...Show All
Visual Studio 2008 (Pre-release) PresentationCore.DLL already loaded
Hiya, I keep getting this error at different times when developing under WinFX in Vis Studio 2005. Error 14 Unknown build error, 'API restriction: The assembly 'file:///C:\Program Files\Reference Assemblies\Microsoft\WinFx\v3.0\PresentationCore.dll' has already loaded from a different location. It cannot be loaded from a new location within the same appdomain.' I only have one project in the solution that uses WinFX, so any ideas what could be causing this Only way I've found around it other than rebooting is pretty strange, have to open up the same project in Expression Interactive and then test run the project, that seems to clear it ...Show All
.NET Development Data Source???????
Hello Experts, I am new to this techology. I am developing an application-in which i am uisng vb.net as the front end and ms-access at the back end. My database name is: db1.mdb and table name is: student When i tried to connect with the ms-access database in one-oledbdatadapter- wizard - it asks to enter value for "Data Source"- i don't know what it wants. i gave my db name then the table-but it replied -something like "invalid path/file name" Plz help me what can i do Thank You The connection string in your OleDbConnection should look something like - ...Show All
Windows Forms Link or sharing BindingSources between forms
Hi, My story is the following, I have to forms, first includes a Datagridview and BindingSource,and the other shows details of each record using a BindingSource and BindingNavigator. Problem is that controls does'nt synchronize between forms current selection in grid dont reflect the current record in second form (detail). In second form (detail) I have a method in wich passing the bindingcontext of the first form and the same datasource that I set on BindingSource of the DataGridView, but is not working. Thanks for any suggestion. Maybe a bit late but does this help http://msdn2.microsoft.c ...Show All
