punkouter's Q&A profile
Architecture Have you tried NHibernate?
I was just wondering... how many of you have tried using an Object Relational Mapper... perhaps something like NHibernate instead of the DataSet: NHibernate is a port of Hibernate Core for Java to the .NET Framework. It handles persisting plain .NET objects to and from an underlying relational database. Given an XML description of your entities and relationships, NHibernate automatically generates SQL for loading and storing the objects. Optionally, you can describe your mapping metadata with attributes in your source code. NHibernate supports transparent persistence, your object classes don't have to follow a restrictive progr ...Show All
SQL Server Cannot install SQL Server 2005 Express on Virtual PC 7.0
Hi, I received the following error message when I attempted to install SQL Server 2005 Express on Virtual PC 7.0.2 as a component of VWD 2005 as well as standalone application: Microsoft SQL Server 2005 Setup was unable to install on your computer. In the 'Microsoft SQL Server 2005 Setup', I received the following information: EventType : sql90setup P1 : do_sqlscript P2: 0x733f P3 : sqls__service__start P4 : 0x42b P5 : sqlsetuplib_service.cpp@301 P6 : sqlca.dll@2005.90.1399.0 P7 : sqlrun_sql.msi@9/00.1399.06 Lastly, it said that it would send the following file as part of the report: c:\Progr ...Show All
Smart Device Development Can't connect to custom device in VS2005
hi i have the same exact problem like the one reported under MSDN product fedback http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx feedbackid=d080dedf-2da7-481e-a34f-c1c4ae3d66e9 could not find a solution for it. please advice. Hi Ehab, There is an issue with VS 2005 Beta in connecting to WinCE5.0 devices over ActiveSync. This has something to do with correctly mapping the CPU while bootstrapping a device over ActiveSync. Later this bug was fixed. So please use released VS 2005 to connect to your device. thanks Siva ...Show All
Visual C++ How to build GDI+ examples - LNK2001?
I've been trying to build some of the example code in the MSDN library, like the examples in GDI+ getting started or the one for Bitmap::LockBits method. Just the very first couple of lines give rise to a problem #include <windows.h> #include <gdiplus.h> creates this link error: xformBmp3 error LNK2001: unresolved external symbol "enum Gdiplus::Status __stdcall GdipCloneStringFormat(class Gdiplus::GpStringFormat const *,class Gdiplus::GpStringFormat * *)" ( GdipCloneStringFormat@@$$J18YG AW4Status@Gdiplus@@PBVGpStringFormat@2@PAPAV32@@Z ) As best I can figure from all the MSDN library and help and searches, I need to open t ...Show All
Visual J# Problem with C++/CLI and J# interaction bug
I'm having a problem with C++/CLI and J#. I am writing a class library in C++/CLI and want to use it from J#. I narrowed down my code and wrote a repro: a.cpp: #using <mscorlib.dll> #include <stdio.h> using namespace System; namespace AA { public ref class A { public : unsigned long Print() { printf( "Hello\n" ); return 0; } }; } b.jsl: import System.*; import AA.*; public class Test { public static void main( String [] args) { A a = new A(); a.Print(); } } To compile do: cl /clr /O2 /MD /c a.cpp link /dll /out:a.dll a.obj mt -outputresource:a.dll;#2 -manifest a.dll.manifest vjc /out:b.exe b.jsl /reference:a.dl ...Show All
.NET Development How to show a long text in the treeview in the text's original format
Hi Friends, I have an xsl as a TreeNodeXsltSrc of a TreeView( Microsoft.Web.UI.WebControls.TreeView). The Treenode should show the long text in its original format(Ex. preseving new line, space etc). I have used the XSLT for converting into treeview specific format. The problem is the Treeview node is showing the long text in a single row, just removing the new line etc. The template used to handle long text's original format is : < xsl:template name ="backslash-n-to-newline"> < xsl:param name ="text"/> < xsl:choose > < xsl:when test ="contains($text, '\n')"> < xsl ...Show All
Smart Device Development Debugging without ActiveSync -unable to get Visual Studio 2005 to cooperate
Hi all, I've been trying to debug a Windows CE 5.0 based device with VS 2005. Since this device doesn't have a full serial port or USB client port available, I've turned to debugging without ActiveSync (I did try merging in some AS partnership information from another device into the registry, but haven't quite gotten AS to connect.) I've used the instructions pointed to elsewhere, e.g. http://blogs.msdn.com/vsdteam/archive/2005/04/28/413304.aspx http://msdn2.microsoft.com/en-us/library/ms228708.aspx However, there appears to be no manual startup server option -- VS 2005 seems to insist that ActiveSync be used as the S ...Show All
Visual Studio Express Editions Checking if application is already running
I have added a context menu item to my application. The problem is that, if it is already running and I right click a file, another instance of the program opens up. How can I check if the program is already running, and if it is, how can I pass control to the existing instance Thanks in advance. Try this... public static bool IsAppAlreadyRunning() { Process currentProcess = Process.GetCurrentProcess(); return Process.GetProcessesByName(currentProcess.Name).Length > 0; } you just have to modify it to suit your need. HTH, ...Show All
Windows Forms CancelButton not compatible with ToolStripButton
I want to use a button in my ToolStrip (a Forms.ToolStripButton) as the "escape key handler" for my form. In the form designer only plain Button objects show up in the list of candidates for the property. Also, if I try to cast my ToolStripButton--as in "this.CancelButton = (IButtonControl) myToolStripButton"--that generates a runtime error. So my conclusions are: Only plain Button objects may be assigned to the Form.CancelButton property. The Button object must be visible. The Button object must be enabled. Why these limitations How about removing any or all of these limitations in future versions... ...Show All
Visual Studio Express Editions Can't open .js files in projects
Hi- I'm (under-)using VC++ Express as an editor and organiser for some JavaScript files, as well as some C files. All files are on network drives. I have no problem with the C (.c, .h) files, but with the JavaScript (.js) files, I can add them to my project, but when I attempt to open them (double-click or right-click, open), I just get (for example): x:\scripts\gaia\harikiri\omt\include\Idle_Tests.js Cannot open file I get the same error if I copy the file onto my local disk ie. it appears to be the extension (.js) which is causing the problem. I've just moved from MSVC++ 6 which I was using for the same purpose, and no doubt I' ...Show All
Visual C# How to handle events for COM object?
I want to invoke COM object in C#. But I always got an exception("Specified cast is not valid.") on the line "m_oConnectionPoint.Advise(this, out m_Cookie); ". why private UCOMIConnectionPoint m_oConnectionPoint; private UCOMIConnectionPointContainer oConnPointContainer; private int m_Cookie=-1; public MyClass() { MainClass mainPred = new MainClass(); oConnPointContainer = (UCOMIConnectionPointContainer)mainPred; Guid guid = typeof( ...Show All
Visual Basic Loading and gathering information from a text document
I am currently producing a program for myself and i need to know how to gather and put loaded text information into a table and allow searching ect, i will clarify with pictures. Please be patient with me because i am a novice. given the following text [item 1] name=Welcome Note description=Welcome to the world of Darkness. class=12 reqlevel=1 quality=1 bonding=4 classes=0000 //All Classes model=5567 level=1 races=0000 //All Races stackable=1 maxcount=1 material=-1 pagetext=1 language=1 buyprice=300 sellprice=100 From a text file, i want to load it and sort it into a table like the following http://i50.photobucke ...Show All
Visual C++ Resource Compiler Fatal Error in Visual Studio 2005 Beta
It's impossible to launch Resource Editor from IDE. Resource Compiler Fatal Error RC1107 is displayed. Your subject says Resource Compiler, but your message says Resource Editor. Which is it Given the error message, I assume the Resource Compiler. How are attempting to invoke it Custom build step Help for that message says, "An invalid Resource Compiler option was specified. Valid options are /r, /v, /d, /fo, /l, /i, /x, and /c." Can you give specific steps to reproduce the problem Thanks, Curt ...Show All
Windows Forms Install Bootstrapper returns The Page Cannot Be Found
We have a clickonce application that we have been using for about 6 months. Webserver is running Windows Server 2003. I have installed the .NET Framework 2.0 and checked the MIME extensions, and they are listed. I have added some reports that require Crystal Reports for .NET Framework 2.0 to be installed as a prerequisite. I have checked the 'Create setup program to install prerequisite components' checkbox, the 'Crystal Reports for .NET Framework 2.0' Checkbox, and the '.NET Framework 2.0' checkbox. I have tried both the Download prereqs from vendor's site and from same location as my app, both with the same pr ...Show All
Visual Studio Express Editions finding lesson resource file for absolute begginer video
I am trying to locate the Resource File for lesson 2. It says to find it where I downloaded the video from however I cannot locate it anywhere. Any help would be appreciated. Are you talking about the video's from "LearnVisualStudioNow" The free one's you can download from the MSDN VB Express site If you downloaded the videos, the code file should be in the same loacation you saved the video to. Hope it helps. ...Show All
