M. Houy's Q&A profile
SQL Server Use parameter in field list?
Hi. Hi I have a problem with using parameter as a column in an sql. Is this possible Lets say I have a input value @field1 that I want to use as field in my sql. "SELECT @field1 AS somthing FROM table" return only the value from @field1 since the parameter is a string. I tryed to write the sql as a string and then use EXECUTE. It will give me the correct result when I run it but the problem is that the dataset doesnt understand that it contains fields. Ex: DECLARE @sql VARCHAR(8000) @sql = 'SELECT ' & @field1 & ' AS somthing FROM table EXECUTE(@sql) Is there anyway to use a input parameter as a column name Reporting Services. Preferble without using stored procedures. Thanks ...Show All
Windows Forms UserControl with ComboBox
My aplication needs a usercontrol consisting a combobox. So I have to provide the commonly used propertiesfor the comboBox for this usercontrol as well. I build this UserControl DLL and using in some other Windows Forms, but then some problems arises. I have few problems in that: 1. There is a property called "FormatString", I have attached the editor "FormatStringEditor" also with this while declaring this property. But when I try to use this property in the "property-pane" I am getting an error Object Reference not set to an instance of an object" 2. I have also exposed the property for "Text" and "Items" and attached these properties to the ComboBox corresponding prop ...Show All
Visual C# HELP: Convert PDF to HTML
Hello all Programmers! I want to write a software myself that can Convert PDF file's content to HTML. But I don't know where to start: Is there any valid ActiveX for this Any exist Function that can extract PDF contents and add it to an HTML file Or anything else that a newbie like me don't know So wonderful if I can receive any reply of yours... Thanks a lot! So many things to learn in this world, hihi : - ) you need to use some PDF SDK that maybe available then generate html from it in some way. in .NET there is no direct way since PDF's are not a Microsoft product really but Adobe as well as having no relevance to the .NET Framework itself. I believe there are a couple of open source PDF projects you can lo ...Show All
Software Development for Windows Vista Using VB6 on Vista
Is VB6 support on Vista as a development language I have a VB6 application (which is pretty big), but when I come to compile it on Vista RC2 is fails to register all the activeX dlls that are build as part of the application. I did manage to get round it, but only by running VB6 as Administrator. In a day to day dev environment I don't want to do this every time. I am a local admin so why doesn't this allow VB to register my dlls. Does this behavior have something to do with UAC Thanks for your help Graham Hi. Yes, I've tried that. However when I run the IDE with that checkmark checked, none of the OCX's are found to be registered. The only way I can actually get the IDE to start nor ...Show All
.NET Development Guidelines for "using" with ADO.NET components
Hi everyone, I know how to use the "using" statement but I'm a little confused about exactly when to use it with the ADO.NET components. Let's say I have a SqlConnection, SqlCommand, SqlDataReader. Should I use using with all of them, like this using (SqlConnection conn = new SqlConnection(...)) { using (SqlCommand cmd = new SqlCommand(...)) { using (SqlDataReader rdr = cmd.ExecuteDataReader()) { } } } Or do I only need to use "using" on the outermost construct (in this case, the connection), or what are the best practices for this -Eric Harmon It is preferable to use "using" because: 1) It is easier to read and understand ...Show All
Connected Services Framework HelloWorld sample not working
Hi, I've got the HelloWorld sample application working perfectly on one of my laptops. But today I tried to run it on a different laptop and it fails to run properly. Both laptops have similar installations (CSF Dev edition for XP) and use similar app.config and manifest.xml files. After I press the "CreateSession" button I get a messagebox displaying a SOAPFaultException: Internal server error occurred. I tried to get more detailed exception information, but nothing was written to the event log and using the VS2005 debugger didn't help either. Does anybody know how I can track this error Greetings, Leon Zandman Stringray wrote: The thing that bothers me is, that in ...Show All
.NET Development Remote object access to Server.
Hi there This is probably a silly question, but I just can't work out how to do it. I have a simple app that is a client that "scores points" and a server that applies those scores to a dataset. Problem is, I can't work out how to access the dataset in the server from the remoting object. I tried putting a delegate in the remoting object but then couldn't find the instance of the remoting object from the server. Can anyone tell me a way to access functions in the server from the remoring object Thanks Dave First of all you will need to use common assembly to be able to invoke the methods in the remoting object. let say that your server application is windows application that change the result in a dataset object . it s ...Show All
SQL Server SSIS (Integration Services) Transfer SQL Server Objects Task: This task can not participate in a transaction
In short, does the “Transfer SQL Server Objects Task” support distributed transactions In trying to use a “Transfer SQL Server Objects Task” in a container using a transaction on the container. The task is set to support the transaction. It is setup to copy table data from several tables from a non-domain server (sql server 2000) to a domain-based server (sql server 2005). I get an error stating, “This task can not participate in a transaction”. I am wondering if it means exactly what it says – this task in SSIS can’t participate at all. Or does it mean that it won’t in this scenario for some reason. I attempted a simple copy of data from mssql 2005 to mssql 2005 (same server) and the task still failed). MSDTC appears to be runn ...Show All
SQL Server Windows integrated authentication - Domain controller
If my SQL Server authentication is windows integrated authentication, whenever my application makes a connection to SQL server does it contact the windows active directory domain controller to authenticate the windows user account How does windows integrated authentication work in the background http://blogs.msdn.com/sql_protocols/archive/2006/12/02/understanding-kerberos-and-ntlm-authentication-in-sql-server-connections.aspx ...Show All
Software Development for Windows Vista Privateprofile access win.ini as filename hung app
I have found that when using pathname\win.ini as the filename for use with private profilefunctions that this will not work correctly in vista. Vista reports a hung app message. If the filename is changed to something else such as pathname\setup.ini, the same code works exactly as expected. This fault was found in vista beta 2, and then again when tested on release version of vista. I found the problem with my production app, and isolated the code to a test program to reproduce the problem. The only thing changed to make it work is to rename the filename from pathname\win.ini to pathname\setup.ini. How do I, or how does a file elevate ...Show All
Visual C++ VC2005 : Disable c++ exception in Dll application
Hy, I create a simple Dll application that use stl. I try to disable exception to optimize my application. First, I disable exception in project properties and I define "#define _HAS_EXCEPTIONS 0 " in my prefix include. But it doesn't link, I have this error : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::exception::_Raise(void)const " (__imp_ _Raise@exception@std@@QBEXXZ) referenced in function "protected: static void __cdecl std::vector<int,class std::allocator<int> >::_Xlen(void)" ( _Xlen@ $vector@HV $allocator@H@std@@@std@@KAXXZ) 1>Exception.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exce ...Show All
Microsoft ISV Community Center Forums Take out the ability to input values on combo box?
How do I take out the ability to input values on a combo box For instaance, if I want the user to select the month ...Show All
Visual Basic text formating
Hi, i would like to ask whether can i format the text in textbox in such a way that whenever there is a bullet, it will display it in a newline. the textbox data is retrieve from a database in the same column. Hi, sorry I wasn't clear. It should be: Private Sub txtDisplay1_TextChanged( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtDisplay1.TextChanged txtDisplay1.Text = txtDisplay1.Text.Replace("."c, ". " & Environment.NewLine) End Sub You also hadn't declared the characters correctly, as it would have been looking for a string "95". If you're using a full-stop now, it should work OK as above. However, you will want to be careful doing this in the text-changed event. Wh ...Show All
Audio and Video Development Text to Display Rending
Here's the issue in the simplest terms I can explain it. This all started with subtitles. It is obviously easier to have a markup file with all the subtitle text in it instead of having to make individual graphics for each. Far as I know, this should be possible. Unfortunately, it's not going so well. After many attempts at subtitles, I decided to just add a very basic text output from the main markup file. It still did not work! I've checked the fonts, tried a few, and they are all Open Type. It's a very simple piece of code that just sets the position, font, and color. I left out all the timings and animations to be safe. Is there a bug in the Toshiba Players that won't do this or I am just overlooking something right in front of my face ...Show All
Visual C# Problem with Sockets
Hi buddies, How are you !! I got the following problem while i am developing a chat software My software consists of two parts: Server Client each in a seperate project, and each works very well when they are working alone, but when i try to test my application -I run the server then the client- i got the problem that when the client create the TcpClient object i got this message: Only one usage of each socket address (protocol/network address/port) is normally permitted I think that is because i use the same port number for both applications but this is the only way to run both applications on the same machine. the short version of my question is: How can I start a TcpListener and a TcpClient on the ...Show All
