Ryan_H'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 multiline tab control
hi, i have to made a custom multirow tab control where the number of the visible tab rows should be selected by the user. when a new tab page is added, and the number of tab rows has to grow bigger than the maximum number of rows, then the updown control should appear, as in case of the single row tab, and should act the same, i.e. scrolling the tab header. my question is: is there a way of accessing the tabcontrol's header in order to customize it's behavior (i.e. when to show the updown control, what happens when the user press the arrow buttons in the updowncontrol, limit the number of visible rows, etc.). thank you, calin It would be much simpler to write your own control rather than t ...Show All
.NET Development FtpWebRequest GetResponse throw The server committed a protocol violation :(
Hello. I have some trouble with FtpWebRequest class. I use it for connection to two ftp servers The first server is working perfectly, but when i use the same programm to connect to another one the "The underlying connection was closed: The server committed a protocol violation." exception is thrown when I call GetResponse method. I found only one difference between servers. The first server returns: 220 Hello k-net ftp server The second FTP return the same banner but ON RUSSIAN Lang!!! 220 ! ! Is any UseUnsafeHeaderParsing property exists for FTPWebRequest, like for HTTP P.S> I'am not using SSL! The sources is here: ///... FtpWebRequest listRequest = ( FtpWebRequest ) We ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Languages supported
I'd like to know which programming languages XNA supports. Thanks in advance for your answer Luca, if you're referring to the XNA Framework we have not announced the official list of languages yet. The demos we showed at GDC were all written in C#. But we are also evaluating ways of supporting additional languages such as Visual Basic or Managed C++. If you have any feedback about which languages you would like us to support, please let us know! Brian Keller ...Show All
.NET Development how can i get vsextwfx.msi install
i have vswxtwfx be install with final release of .net 3, vs2005 pro, win xp sp2 and latest patches installed the ms windows sdk but when i try to install the vsextwfx.msi iget the following error error reading from the file vsextwfx.msi verify that the file exist and you can access it Can these things be used with vs2005 kinda lost here thanks Paul Ensure that the account that you are installing with has administrator privileges. however if you were able to install Visual Studio, then you are probably already doing that. Additionally, you might want to try redownloading the package. Finally, if this is still an issue or if anyone else is havi ...Show All
.NET Development Get Ressources of a referenced assembly
I have an simple assembly A that refernces (linked) another assembly B that includes ressources (png files) that I want to use in assembly A. I included the png images into assembly B just via Visual Studio --> add new item --> build action --> embedd as ressource. When I look into assembly B using .NET refelctor I find the ressource directly under the ressources folder: public resource MyNameSpace.MySubNameSpace.FileFolderName.ImageFileName.png how can I acess this file in assembly A. I suppose I have to use the RessourceManager but I fail to find the correct parameters for its contrsuctors. Any class from such an assembly will qualify, you only need the dummy class if it is a resource-only assembly. ...Show All
Visual Basic Unexpected behaviour with INSTR function
G'day, please forgive me as its my first foray into VB.NET (Normally a VB6 bloke). I'm getting some strange behaiour from the INSTR function. I wish to read in a CSV file but split the data into columns which I'll then plot. The data is structured such that the first record contains the channel names, then comes the units and finaly the data stream. A record can contain 200+ strings delimited by a "," the record is terminated by a CRLF so I use INSTR and VBCRLF. The first vbCrLf is picked up correctly - the expected number of channels is loaded into sHeaders (see below). BUT the next one sUnits is NOT loaded correctly - it actually misses a vbCrLf and continues to loads till the next vbCrLf appears after that one. ...Show All
Visual C# Properties in C#
Hi All, I really have a doubt regarding use of property in C#. My question is: Can we have private properties inside a class If yes, then please let me know what is the use of private propertise in a class. Thanks and Regards, ChatanyA Agrawal Hi, Chatanya Usually, we use properties to get some info about the class from outside, in this case we use public or protected. Also, abstractly we can free modify properties as private, if we use them inside the class. Thanks ...Show All
.NET Development SQLDataSource
I have a very very very simple question. I am using vs 2005 and before I had programmed with vs 2003 and there are a few new components and a few changes. I added an sqlDataSource to my project and I did every connections and it's ok, but now I want to show the datas in the tables by a label and text box, in vs 2003 I use sqlcommand and then datareader and then I show the datas easily but here, what should I do if i want to show the datas in the label and text boxes by sqlDataSource ...Show All
Visual C# Help with PadRight Method
I am trying to learn the new way of printing (as opposed to the "old" VB 6.0 way). Everywhere I've looked so far shows nice even columns of data printed out. All of the examples assume that the data fields are going to be equal in length. I have been unable to find anything (even MSDN/Microsoft) that explains how to code for variable length print fields. Can anyone please either show me how to print variable length fields so that the report prints aligned columns, or are there any web sites/books available This is the resulting report, my feeble attempt at coding the print routine is below (I've listed only the pertinate lines): NOTE: All of the data is on one line, there are no ...Show All
Visual Studio Tools for Office VSTO Outlook Add-in Debug errors even for simple HelloWorld add-in
I am trying to learn about VSTO Outlook development and I've tried several Outlook add-in samples online. I'm getting all kinds of weird behavior when I try to debug even a simple HelloWorld add-in. public class ThisApplication Private Sub ThisApplication_Startup( ByVal sender As Object , ByVal e As System.EventArgs) Handles Me .Startup MsgBox( "Hello World" ) End Sub Private Sub ThisApplication_Shutdown( ByVal sender As Object , ByVal e As System.EventArgs) Handles Me .Shutdown End Sub End class Sometimes I get the following in a Microsoft Visual Studio message box: "Unable to start debugging. Check for one of the following. The application you ...Show All
SQL Server Identifying a table update / insert / delete
How to find out that a table has changed. For example if a table has 50K rows, and if any update, insert, or delete was made it should be captured without using any trigger. Is it possible to get such information from any of the system table or DMVs Thanks Uma & Aego. I got sufficient details now to find the solutions with your inputs. A final question before i close this thread: Does it mean replication agent too reads the transaction log to find out the updated rows If so is there any API provided by the SQL Server that can be used through programming to do the same work ...Show All
Visual Basic database report
hello, i'm using ADODB on my vb8-access. before on vb6 i use data report designer to prepare a print, but here on vb8, how can i do that, without using crystal reports i would like to design my report just like report designer, is it possible or are there any turn around for this thanks hello, i've tried filling my dataset with access data but it only accepts sql server file. can you help me with this please ...Show All
Windows Forms how to open ms word in windows application
in my project i have a requirement of opening the msword application and editing can any one help me how to solve this proble in windows application in my application i am having a tab control in one tab page there are multiple text boxes and lables are present and in another tab page i want to display a word file with min 3 pages the user on seeing the word document and using the find option of the word application he will be filling the text boxes any one can help me how to display the word document in one tab page or i can also adjust if that word document opens in an saparate form but it should contain find option and i dont know how to open the ms word application from the vb.net programming ...Show All
Visual C# Offsetting UserControl location...
I am having this annoying problem that I do not understand. I have a UserControl and I am trying to change its Location . I want to say: this .Location.Offset(iAdjustX, iAdjustY); However the above does not work. It seems I need to do this: Point pt = this .Location; pt.Offset(iAdjustX, iAdjustY); this .Location = pt; I do not understand why I cannot just apply the Offset method to the the UserControls Location . Am I missing somthing here Thanks, Bob Peter Ritchie wrote: Carver42, the Control.Location property returns a Point structure. Since Point is a structure this isn't returning a reference, it's returning a value. "this.Location.Offset(10,10);" ...Show All
