Chris Wu's Q&A profile
SQL Server How to create trigger to check column in any inserted record
How can I create a trigger to watch a couple of field values in each insert that happens on my table and peform an if statement on those values then replace those values with another value if the statement is true also, I am not sure whether to use an AFTER or INSTEAD of to accomplish this. What I want to do is essentially: Create trigger triggername on tablename watch for any insert of a row in my table If column1 = something then set colum1 to something else I'd just use a For trigger - see example below creating table& ...Show All
Visual C# Windowsform : hideframe with transparency
Hi, I've made a form with a label which is transparent. I've also got a contextmenustrip with an item that makes it possible to hide the formframe : this .FormBorderStyle = System.Windows.Forms. FormBorderStyle .None; When I execute this code, the frame hides, but the complete forms moves up the height of the frame (I can live with this), but also the background (which is transparent) moves up (without repainting). I don't know if this explains the problem enough, so I will give an example. Let's say you move the form to a place where the top of the transparent area is the beginnen of a color area in the background ...Show All
Visual Studio Installing DirectX9 SDK disables Visual Studio Help
I installed Visual Studio .Net 2002 and after that I installed DirectX 9.0 SDK. But when installing the DX9 SDK, I chose to install Extensions for Visual Studio .Net When I opened VS .Net, only DirectX's help is available and Visual Studio's help is not there. So, I removed the 'Extensions for Visual Studio' from the SDK with no end of problems. I removed the entire DX9 SDK and still no changes. I removed VS .Net and installed a fresh copy of it and still I have the same problem - Only DirectX help and not Visual Studio's. Can anyone help me on how to 'bring back' my VS .Net help Hello Senthil, Please try opening the Options dialog ...Show All
Windows Forms Win Form & ASP.NET
Hi, I have a question: how can I, if it's possible, add a winform to an asp.net page Hi greath78, you are missing something. You should write "http:Test.dll#Test.Test". eg. <object id="MyTestCtl" classid="http:MyCustomControl.dll#MyCustomControl.MyCtl" height="800" width="800" VIEWASTEXT> </object> Regards, ...Show All
Visual Studio Express Editions Oh dear!
Oh Dear! I have been battling with this software for some weeks now and although my ISP says ASPs will run OK and has proven this with their own code, I have found that even the "out of the box" solutions and templates provided by Visual Studio Express consistently fail to work! Fustratingly, and after many hours of work they perform fine on my PC, but not when published (even when published in their native format). The errors of "RunTime Error" and "Server Error in '/' Application" keep appearing no matter how simple the code. I am shocked and horrified that Microsoft are ending their releases of FrontPage which ha ...Show All
SQL Server Problem creating SQL Server Mobile Subscription
Hi there When I try and create a subscription in SQL Server Mobile to a published SQL Server 2005 database, I get the following problem error during the data synchronization process: Failure to connect to SQL Server with provided connection information. SQL Server does not exist, access is denied because the IIS user is not a valid user on the SQL Server, or the password is incorrect. HRESULT 0x80004005 (29061) Any help would be gratefully appreciated. Regards JB Mahesh Thanks for the reply. I have to confess I am not too clear on what you mean ...Show All
Visual Studio Express Editions System fonts
Hi, Is there a way I can display all the system fonts within a combo box for user selection any help would be appreciated. Ron Thanks Yes I agree Just what I need. ...Show All
Windows Forms Higher Performance Option To Web Services
I am designing a smart client application that needs to read and write to a non Windows SQL data base. In simple terms the user interface will be on a PC (smart client). The business and data access logic will be on a second Windows Server. The data will live on a non windows database server. From what I read, I can use web services ...Show All
SQL Server .mdf to .mdb
My web host only supports .mdb database files, so is there a way to convert .mdf to .mdb with a program Or would I have to do it by hand Thank you. I am not aware that such a program exists. Maybe you can use SQL Server DTS or SQL Server Transformation Services to download your database into a .mdb format. ...Show All
Software Development for Windows Vista Should we now replace "MS Shell Dlg" in our .rc files with "Segoe UI",
Hi, I've got a question regarding Segoe UI. I thought this thread would help me regarding Segoe UI. In one of the training class, we were told that apps for Vista should use "Segoe UI" as their font for dialogs . For NT/W2K , people in the past were told, not to use " MS Sans Serif " anymore but instead " MS Shell Dlg " as this maps via a registry value to the proper Shell font which can be switched for the whole shell in one fell swoop. Should we now replace " MS Shell Dlg " in our .rc files with "Segoe UI", or will "MS Shell Dlg" by default map to "Segoe UI" on Vista or is there yet another face name that will map to "Segoe UI" when ...Show All
.NET Development Two-way communication using IPC
Hello, I've been reading up on IPC and looking at sample code, and I can't seem to figure out how to actually accomplish communication from a client to a server. I understand the concept of a server hosting a dll which contains a method that the client can call. However, how can the server also obtain a reference to the same object I want the client to be able to send a message that makes it to where the server can use it. To clarify my question, the examples I've seen so far have been like this: Server creates a channel exposing Class A. Class A contains a handy-dandy method that can multiply two ints. Client creates a channel to be able to ...Show All
Visual Basic send mail
Hi, i have problem in writing send mail codes. can someone pls help me regarding it i have written code to send mails but somehow there are errors. i have attach my codes below. when i click on the send button, an error message prompt out saying that "An Unhandled exception of type 'System.nullReferenceException' occured in testingMail.exe. Additional information: object reference not set to an instance of an object." Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim message As System.Web.Mail.MailMessage message.To = "li-ching.ooi@av ...Show All
.NET Development Bug with NullableConverter ?
When attempting to convert Decimal to Decimal at runtime Type targetType = typeof(decimal ); decimal newPropertyValue = 2.3; -------------------------------------- NullableConverter nullConverter = new NullableConverter (targetType); object nonNullableValue = nullConverter.UnderlyingTypeConverter.ConvertTo(newPropertyValue, nullConverter.UnderlyingType); System.Exception ...Show All
Visual C# Question: C# interoperate with an unmanaged COM with union data type
Hi, Help please. I use .net 2005 IDE to "Add reference" to a COM (named MyCom.dll). The COM has union data type looks like: typedef [switch_type(_DataType)] union _Union_data { [case(D1)] signed char v8; [case(D2)] signed short v16; } When I view Interop.MyComLib.dll( created by .net IDE) in Object Browser, the above union structure _Union_data become empty. Therefore, I have no way to access the field v8 or v16. It did not help even I run TlbImp.exe to generate the metadata. what should I do Thanks in advanced! -yian ...Show All
.NET Development Code runs but database doesn't update
All, I'm new to ADO.NET (used to work in ADO and am really struggling with the concept!)... I've got a web form, which has a dataset and connection attached with 2 text fields that I want to use to add a new record to a table. The code runs fine, but the database does not get updated... the db is Access. Here's the code - I know I'm doing something stupidly wrong, but I can't work it out! Thanks in advance. Dim strPN As String Dim strDesc As String strPN = Me .txtPN.Text strDesc = Me .txtDesc.Text PartConnection.Open() Dim ds As New PartDataSet Dim table As New PartDataSet.PartsDataTable Dim ...Show All
