jbuysrog's Q&A profile
Visual Studio any complete examples of creating new custom C# projects
Does anyone have a full example of a Visual Studio 2003 custom C# project which demonstrates 1. it appearing in the New Project dialog, in its own folder (I know this means adding an entry to TemplateDirs). 2. it having custom C# files which I can add using Add New Item 3. it having its own icons - so I'll need to know how to create a resource file. I'm not trying to extend VS, just create my new template projects. Its a lot to ask- does anyone have this information Jason To add the custome c# files to the project directory ENVDTE.Project prj; proj.ProjectItems.AddFromFileCopy(filename); If a folder needs ...Show All
SQL Server Could not load file or assembly ADODB, Version=7.0.3300.0
I have an application broadly deployed (about 10 computers). As of yesterday, two of these computers are unable to start the application, and failing with the error below. All other computers run the application just fine. System.IO.FileNotFoundException: Could not load file or assembly 'ADODB, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'ADODB, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' I checked and ADODB.dll version 7.0.3300.0 is in the GAC in the deployment target machines. I fin ...Show All
Visual C# Retrieving from a DataRow
Can I retrieve a field from a DataRow wtihout having to cast it to the correct type I have a class that contains a DataTable member. The default constructor fills it from a table on an SQL server. Once created, getters return lookup items from the table, based on received criteria. The getter methods accept a string or set of strings, apply a Select on the member tables, and set a result string from the data table. For example: public string getLocationData(string SiteID, string Location) { string result; DataRow[] rows = LocationInfo.Select("Practice = '" + SiteID.Trim() + "' And Location = '" + Location.Trim() + "'"); if(ro ...Show All
Visual C++ com/atl attributes broken
It seems most of the ATL/COM attributes from 2003 -> 2005 have been broken. Im using the RTM. I just compiled a COM/ATL project which works fine in 2k3 but in 2k5 i get lots of errors with attributes. A classic is: [ uuid("xxx-blah-xxx") ] class myForwardDeclaredClass; That no longer works. I find I have to do: class __declspec(uuid("xxx-blah-xxx")) myForwardDeclaredClass; There is no documentation or acknowledgement of this problem anywhere. I wonder if anyone at MS actually tried compiling any COM/ATL projects in 2k5 before it shipped Quite simply, unless breaking changes are documented then a project in 2k3 should compile in 2k5. I ha ...Show All
Windows Forms Global Parameters needed ...
Hi, I'm using C# for a Windows Forms based application. I need to share across several classes/objects some global parameters like path names. So far the only method I found is to pass to each class constructor a pointer to a class that contains my parameters. Does anybody knows how can I define Global Parameters to my application Thank you Thank you all, I think I have a solution now ...Show All
Visual Studio 2008 (Pre-release) Strange XamlReader XamlWriter situation
Hi I've come across a strange situation when serialising Paths with PathGeometry Data. When I create my PathGeometry it consists of several LineSegments. That's fine and it lets me serialise to Xaml and it's faithfully reproduced when viewing. However when I read in the same XAML file the PathGeometry no longer consists of several LineSegmentss but rather a single PolylineSegment. I employed a workaround but surely the point of a serialisation language is to be able to store the structure exactly as it was created Unless I missed something that states this is intended. Andrew In general, we do not gua ...Show All
Visual C# How can I get TextBox value from another form ?
How can I get another form component 's value such as textbox,combobox... Please tell me If you know. Thanks a lot ! Take a look on this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=141289&SiteID=1 Best regards. Fernando Cardoso ...Show All
SQL Server Execute a package on a remote server
I want to execute a package that's found on a remote server as MSDB. The execute package task locally is not allowing me because i don't have a login permission i guess because i'm not on the same domain and my user account doesn't have the neccessary privelages to access the server. However i can execute sql statements and data flow tasks on the same server. Isn't it possible to use the login and password of the sql server in away or another to execute the package Thanks Thanks for your comments. I fail to understand the following comments - can you please elaborate the following ...Show All
SQL Server Bulk Insert Unicode
Good day, We are using bulk insert with a formatfile to load a text file into sqlexpress. One field in the text file contains non-ascii (unicode) charaters and the corresponding database field is nvarchar. When the record and row are specified in the format file as: <FIELD ID="23" xsi:type="CharTerm" TERMINATOR="\t" MAX_LENGTH="400" COLLATION="Latin1_General_CI_AS"/> <COLUMN SOURCE="23" NAME="FullName" xsi:type="SQLNVARCHAR"/> the value "Boca Cura" gets imported as "Boca CurA!". This is true even with datafiletype set to ...Show All
Smart Device Development Signal point with the coordinate
is it possible to use the access point with signal and calculate the coordinate in the area You won't find such information freely available, it's proprietary and most likely patented. For example: http://www.daconi.net/wifi-pos/wifi-pos.html It probably based on signal dissipation to calculate distance to AP. A B x C You have stations A, B, C with known locations and client x which moves. If you can measure signals from each base station, you could calculate distance to it. Now you have distances A-x, B-x, C-x and it's a matter of simple math t ...Show All
.NET Development C# console app get security error running from server
It runs ok using my computer but not after the .exe is put on a server and run from there. What do I need to change I don't need any additional security. It needs to run as if it was a VB6 application. There is a couple of ways: 1. Use Active Directory to push it out to clients 2. Use the Wizards 3. Use the caspol command-line utility (comes with the framework). ...Show All
Visual C# find item at index using list <T>
how would i find the item in a list<int> if i know the index of the item i am looking for. I tried list<int>.items[4] but that won't compile even though the item property exists in documentation. Try this List<int> l=new List<int>(); l.Add(1); l.Add(2); l.Add(3); l.Add(4); l.Add(5); MessageBox.Show(l[2].ToString()); ...Show All
.NET Development SSL server throws WebException for a protocol violation.
Hi, I'm currently working on connecting to an HTTP server on a local network to grab log files, push configurations, and modify access rights to the server. This product could be deployed to sites where said server has SSL enabled. As such, I am doing testing on a server with SSL enabled. I already have it set up to accept server certificates, but I'm having an issue when I try to get the response of the server. The code snippet is: System. String path = "{undisclosed}" ; string addy = mResovedAddress; if (!addy.StartsWith( "http://" ) || !addy.StartsWith( "HTTP://" )) { addy = "http://" ...Show All
Windows Forms MDI "popout" windows
Hi, I've seen a couple MDI applications with the ability of MDI client windows to "popout" out of the MDI server and being not bound anymore. Anyobdy has an idea how to do this thx Try setting the MDIParent property to null. You might just get lucky and this'll be all you need. I've never tried to separate MDI children fr ...Show All
Windows Forms scaling image in ListView
I'm using a ListView in multi-column Details mode. I'd like to add an icon along with text to the first column of my items. I've figured out the code to do this, but I still have one problem. Here's my code: ImageList imageList = new ImageList(); imageList.Images.Add(Properties.Resources.myImage); myListview.SmallImageList = imageList; myListview.Items.Add("hello", 0); myListview.Items[0].SubItems.Add("world"); Note that I've already added the image to the project as a resource. The image shows up as expected in the first column to the left of the word "hello". The only problem is that it's ...Show All
