melc's Q&A profile
Visual Studio 2008 (Pre-release) machine.config error with system.ServiceModel; please help
I'm running Windows XP Service Pack 2. I've installed .NET Framework 2.0, ASP.NET 2.0, have VS 2005 RTM and installed the runtime of WinFX 3.0, December CTP. I removed .NET 1.1 Framework from my machine just to alleviate any conflicts. I get this error when I create a service with WCF (I'm basically using the Calculator sample) Parser Error Message: Unrecognized configuration section system.ServiceModel. Source Error: Line 1: < xml version="1.0" encoding="utf-8" > Line 2: <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> Line 3: <system.ServiceM ...Show All
SQL Server Package dies after about 10000 seconds.
I have written a package that archives off old orders over night, it appears that this package is failing after about 10000 second every time it is run. I don't think it is memory as I am running it and checking for memory leaks. Basic run down of package is EXEcute SQL task to get orders to delete If a for loop, loop each ordernumber within the for loop there are 2 dataflow dataflow 1 find related records in child tables (oldb connection using query) using a mutli split first check (with lookup) for records already in archive database only copy on a fail from the look up second delete related records data ...Show All
Visual C# Using fields as parameters in a method
I have a requirement in a project to build a history. No biggie, but there are dozens of bool fields and processing each one is very time consuming. My approach is to add a field name to an arraylist when the property is changed. OnSave() or Dispose() I look into the object and check to see if the field list is empty or not. If not, I process the list looking at each item comparing it to a clone of the original object so that only true changes are written to the child history collection: internal void WriteHistory(){ string changedValue = string.Empty; originalValue=string.Empty; &n ...Show All
Smart Device Development NotSupportedException in PInvoke for .NetCF C# project
I have a dll in C++ with a function called fun1: typedef void (WINAPI *fp)(); typedef struct info { DWORD size; RECT rc; fp funPtrcb; }*info; _declspec(dllexport)DWORD WINAPI _cdecl fun1(IN info pinfo); My C# application has this code: public delegate void CB(); public struct Init { public UInt32 size; public RECT rc; public CB funptr; } [DllImport("xxx.dll")] public static extern Int32 fun1([In,MarshalAs(UnmanagedType.LPStruct)] Init initstruct); Init in = new Init(); CB myCB = new CB(method1); init.funptr = myCB; int x = fun1(init); I f ...Show All
Visual C++ cannot debug "Hello world!"
Hi, I created a win32 console application starting with an empty project using Visual Studio 2005. I then added a cpp file and typed in the following code: #include <iostream> using namespace std; int main() { cout << "Hello world!\n"; return 0; } When I try to run the program by pressing "Start Debugging" (F5), a console window appears then I get a popup saying : "There is no source code available for the current location." I then have an option to "Show Disassembly". I can see my output in the console window if I click "Start Without Debugging" (Ctrl ...Show All
.NET Development SQL Data class / structure?
Someone on a board somewhere took a look at my code and said I shouldn't be manually assembling strings for SQL queries, I should be using an SQL Data class (or was it a structure). I can't find a good, clear reference to this. Advice Dave, for writing queries on the fly, we dont have any ADO.Net API to do that for you. Doing it manually as you show above, is the only way I am aware of. With that said, - If the values that you're appending to the query are user entered and if you are concerned about SQL Injection then you might want to be using SQLParameter instead of appending them directly to the query. HTH, Sushil ...Show All
SQL Server Execution Plan Mystery
I was hoping someone could shed some light on wierd situation i'm experiencing. I have the following query: select count(*) LeadCount from auto_leads al where received > dbo.GetDay(GetDate()) dbo.GetDay simply returns a smalldatetime value of today's date. Now I recently got thrown into a data mess and for some reason this query takes 8 seconds to run. Now the first thing I did was update the stats on the Received column of this auto_leads table. I re-run the query and I'm still getting 8 seconds. I look at the execution plan I can make figure out why this is happening. I then change the above query so the filter received > ...Show All
Microsoft ISV Community Center Forums Error VB6 when I run application in w2k3 Domain Controller
HI, I have an application implement in VB6 and when I run in W2k3 Domain Controller give error 713 time execution. please, help me. Any suggestions are very much appreciated. Hi Franco, Generally this error means there are some referenced class can’t be found. When you developing a program, you referenced some dll in your develop environment. But when you deploy this program to other machines, maybe that dll hasn’t been deployed to that machine also. Then it will report this error. This is very code related. We need to confirm is there any more detail information for this error, for example: ...Show All
Visual Studio Add-In Wizard problem in VS 2005 Beta 2
Hi, I'm trying to build an Add-in with the VS 2005 Beta 2 wizard. After completing the wizard and pressing F5, I can see the Add-in in the "Tools - Add-in Manager". The Add-in itself, however, is not shown in the Tools menu. While running in Debug mode, the line : Command command = commands.AddNamedCommand2(addInInstance, "MyAddin4" , "MyAddin4" , "Executes the command for MyAddin4" , true , 59, ref contextGUIDS, ( int ) vsCommandStatus .vsCommandStatusSupported+( int ) vsCommandStatus .vsCommandStatusEnabled, ( int ) vsCommandStyle .vsCommandStylePictAndText, vsCommandControlType .vsCommandControlTypeButton); wh ...Show All
Windows Forms calc needed size of DataGridView
Hi, I want to size the DataGridView based on the number of rows up to a maximum size. So I watch the data source and when the number of records changes, I recalculate the size of the grid. So far so good, but I do not seem to get the right size... I tried this: int height = this .gridView.Top + this .gridView.ColumnHeadersHeight + (rowHeight) * rowCount; But I seem to struggle with the right value for rowHeight, I tried ( RowTemplate.Height+2) which works fine for TextBoxColumns, so the grid is sized correctly without scroll bars. But if another column type is added to the grid, e.g. ComboBoxColumn, the calculated size is too small. ...Show All
Visual C++ Intellisense problem with VS 2005 solved?
Hi all, I've been having problems with intellisense autocompletion eversince I switched from VC6 to VS2005. It seems that on some of my classes the scope wasn't found by Intellisense (although code compiles and behaves perfectly well). After a little tinkering around, removing .ncb file, rebuilding again and again, dancing around the computer hoping for some magical change of behavior from Intellisense I was still left alone without my loved autocompletion. So I searched around the web, tried the different solutions proposed but to no avail. Yet I've finally found a way to make it work on my computer. The header file where some of the classe ...Show All
Windows Forms How can I make my toolbar in MdiForm not transparent?
When i set the backgroundimage property of my MdiForm,The toolbar in the MdiForm become transparent,too.The toolbar's appearance property is flat.How can I make my toolbar in MdiForm not transparent I want to set backgroundimage in my main program face(desktop image), If another solution in addition,please tell me,thanks a lot! I have the same problem as this question posed two years ago. I have a ToolBar in a form. It works fine when Appearance is set to Normal. The moment Appearance is changed to Flat, the toolbar appears to be transparent, a one-time snapshot at its starting position. Is this a bug ...Show All
Windows Forms Clickonce error when installing
I have tried to use the clickonce and it works fine for me. I am running IIS on my machine and I get no problems. Neither do other people on my network. Other people outside the network get problems though. A message appears saying that the "application is improberly formatted". I published the application to a host outside of my network and now I also get the error. What is the problem and how can I solve it If you need the error file then I can upload it. Thanks Jon Did you change the installation URL on the project properties - Publish tab to http://www.mydomain.com/etc ... or is it ...Show All
Visual Studio Team System First impressions....
...In case anyone is bothered!!! http://blogs.conchango.com/jamiethomson/archive/2006/06/13/4072.aspx Anyone else got stuff to say -Jamie Thanks for taking a look. I noticed when you created the project you choose "Other Projects>Database Projects" not just the Projects Node (notice on your screen shot ) just above Other Project Types. Our product project is that one. The one you used is the existing VS project type and doesn't work the same way our project does. ...Show All
.NET Development Accesss Properties of Object at Runtime
I have to access Properties of an Object at rumtime, that means I do not really know the type of the Object. I do not konw which class it declared with. But I have to access all the properties of it, including its value and the type of properties. I would like to access it similar with Access Hashtable. Does it possible in Dot Net / C# Cheers The .NET feature you want to use is called Reflection. Basically, this allows you to query an object to find out what properties and methods it has, and to access them. If you google "C# reflection" you will get a ton of hits. There wasn't one that looked better t ...Show All
