eldiener's Q&A profile
SQL Server Null replacement on Excel Query
Hello everyone, i'm using an excel source where i get my excel rows using a query, I'd like to replace possible null values with some other data(a zero value or a empty string for example), that's because i'm performing a transformation into a sql server table wich doesn't accept null values for some columns. Is there any function to convert a null value to another one I used the sql server's CASE function, but it didn't work. Any suggestions thanks a lot. Have you tried using Data Conversion transform... you could use an expression like IsNull(Column) ValueifNull : ValueifNotNull See some examples here: http://msdn2.microsoft.com/en-us/library/ms141184.aspx ...Show All
Windows Forms files in sub directories
private void getList() { string[] fList = Directory.GetFiles("c:\\Tmp"); listBox.DataSource = fList; listBox.DataBind(); } This codes brings all the files in the folder c:\tmp. How can make this code return all the files in the sub directories too simply do this: string[] fList = Directory.GetFiles("C:\\Tmp", "*", SearchOption.AllDirectories); The last parameter specifies to search all directories in the given path (the first parameter) does this help ...Show All
SharePoint Products and Technologies Customize SharePoint "My site" template
Hi, I'm a new user to SharePoint and I'm beginning a proyect in which we need to modify some features every user "My site", we need to modify settings before it's created and I don't know how can it be done. I need to know if is posible to chage the permissions to the user so he/she is not allow to delete webparts, list or libraries, and make the owner is the administrator, give all user just hte permisions to add or remove document or informations to the list or libraries but not to to add or remove the default components of the site. Is it posibel and if it is how can it be done ...Show All
Smart Device Development Using PocketPC serial port
Can anyone give me some advice about using serial ports in VS2005 beta 2 on a pocket_pc. At first glance it seems easy, just declare an object as System.IO.Ports.SerialPort with events and process the datareceived event. Simple enough. However, putting this code in a class and tring to generate an event based on the DataReveived event results in "An unhandled exception of type ' System.NotSupportedException occured in System.Drawing.dll" the Additional Information states "Control.Invoke must be used to interact with controls created on a seperate thread". This really has me confused since when you look at the code included, I am not even intentionally using threads. The application files included - opens as serial port when the use ...Show All
.NET Development MFC exe Crashes with /clr option
I have a MFC app that was developed with VC++ 2003 7.1 . I have now upgraded to VC++ 2005 8.0. Eventually I plan on using a Windows Form Control and hosting it on existing dialog. This exe is located on a remote computer (intranet) and I am executing from my computer. 1) First I compiled the project in 2005 and fixed a few errors and am able to compile/run with seemingly no problems 2) I turned on the /clr option and fixed what ever problems and now am able to compile with no errors 2a) now when I run I get a crash. My project settings are: <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories=""$(SolutionDir)\common\include";" ...Show All
Visual C# How to Wrap my normal API dll without any COM interface to C# COM+ object?
Hi all, I'm currently touching on the dll for C# asp.net, My customized DLL is a normal API without any COM interface. And i can't use regsrv32 to register my DLL. So how do i design a C# COM+ object to wrap my DLL Issit using either implicit or explicit method Thanks Best regards, =) hungryghost Hi, hungryghost If you want to call one of the many Win32 API functions that are not available directly from the .NET framework, you should be able to call them using PInvoke (Platform Invoke). (PInvoke is not supported with classes. To call an interface method in a COM dll use COM Interop .) There are excellent tutorials on the Microsoft Developers Network on using PInvoke, so I will n ...Show All
Visual C++ What #include<file> is necessary for using Console::Clear();?
The Visual Studio 2005 MSDN Help Search doesn't explain the prerequisite #include<file> needed before the System namespace can be called, for example, in the case it were needed to execute the following statements: using namespace System; Console::Clear(); Does anyone know this necessarily perchance Thanks. With VC++ 2005 you can create two category of projects: unmanaged, in C++, or managed in C++/CLI. If you are interesting in the former, then choose File > New > Project > VC++ > Win32 > Win32 Console Application. If you are interested in the later, then choose File > New > Project > VC++ > CLR > CLR Console Application. Hope this clarifies the things ...Show All
Visual Basic How Can I make a protected sql database file
I have an access db file with my VB 2005 I want to change it to sql database file with protected by username and password I have sql server 2000 Do you Mean when I setup the Sql Server software!! I have mix authentication Windows and SQL, when I create database and export it to VB 2005 I can connect by b oth way, username and password or by nothing. But what I'm looking for is, how to protect my database to open by other One (I mean open the design and structure) ...Show All
SQL Server runtime reporting designer
we accpeted a bid to produce a runtime report tool compatable with sql2005 reporting services. The vast majority of the rdl/rdlc isn't a problem, our designer looks and behaves enough like the vs2005 editor and our rdl/rdlc output matches. life is good. but the dundas chart designer available from within studio 2005, is that available at runtime We're had to create several controls, the textbox, line, matrix, table, etc to produce the desired runtime behavior found in the reportRendering namespace, but we're really looking to skip recreating the dundas chart UI. Is there a way to get at those namespaces Or looking at the dundas catalogue, which dundas library is embedded in report services gabe ...Show All
Visual C# How to let intellisense use xml doc of assemblies in GAC?
I've developed some C# assemblies that are documented using xml doc and for which I'm generating a CHM file using Sandcastle. These assemblies need to be stored in the GAC because they are used by several (possibly dozens) of applications on a single server. I have learned that to get Intellisense display the xml documentation of a class, I need to store the myassembly.xml file next to the referenced assembly. This is of course a problem, since my assembly is stored in the GAC and I (officially) can't store XML files in the GAC (I agree that there's a hack, but I don't want to use that on production servers). I haven't found any documentation whatsoever that explains me how to get intellisense to show xml doc for assemblies in the GA ...Show All
Software Development for Windows Vista About to get app verified. Looking for advice.
I am about to start the verification process for my company's main web app. Right now it is a pure web app, but is in the process of being converted into a smart client app by building a "custom browser" - using the web browser object inside a windows form. We will be using ClickOnce to deploy. Does anyone have any recommendations or possible pitfalls I should be aware as I go through the Vista Certification process for this type of smart client application If you are converting it from web app to smart client app and using Click once you will be able to certify your application. Using a click once deployment for the certification is smart!!!! All the the tricky parts of the certification I know of are regarding an MS ...Show All
Windows Forms MouseHover Event for Form Buttons (help please)
This is my 1st time at using certain MouseEvents,what i'm want to do is this...The buttons i have now the Form and ToolStrip all have a Black BackColor..What i'm looking to do is when the persons mouse "RollsOver" a Button the Background color will change... The over all Effect i'm trying to Achive is similar to the Windows Media Player Beta 11 the button is Black ,but when Rolled over it Lights up!! Can someone help me with this cant seem to find any good example in any of my books to achive this look... Thxs in advance PS: here is some code i'v got to work partly..lol seems the only time the Button lights up Red is when the Mouse touches the very outer right side of the button...Not even the button itself,when i roll the mous ...Show All
Visual C# Copying Files
Hi Everyone, I needed a little help with copying a certain file type from one folder into another. For instance copying all the .dll files from one folder into another . All help is appreciated I know i can use the System.IO.File.Copy to do it but how do i specify just a certain file type not a file Copy Method: public static void CopyDir2Dir( string sourceDir, string desDir, string searchPattern) { DirectoryInfo dirInfo = new DirectoryInfo (sourceDir); foreach ( FileInfo file in dirInfo.GetFiles(searchPattern)) { file.CopyTo(desDir + "\\" + file.Name); } } Usage: CopyDir2Dir(@" C:\dir1 ", @" C:\dir2 ", " *.dll " ...Show All
Visual Studio Express Editions problem reinstalling visual c# 2005
Hi, I recently downloaded and installed VC# 2005 Express Edition, and now it wont load the apps from my previous version of VC# 2005 Express Edition. My CD with the original version was lost so assumed I could just download one off the net and get my old apps to work. When I load the apps the .cs files seem to be missing. Pleeeeeeeeease help! :) I saved my projects to CD first, then reinstalled VC#, then tried to reload the projects. All other files were there, the .cs files were listed in the solution explorer but they would not load. Said they could not be found. ...Show All
Visual Studio Express Editions Treeview and nested set
Hello this is my first post, I hope to be able to help others when I can but my first post is a request for some help :) I've searched high and low but am at a loss on the best way to populate a treeview from a nested set table. This post: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=784417&SiteID=1 asks the same question but I'm a little unsure how the problem was solved. I've created a table which stores hierarchical data on site details. An example of the result from one of my stored procedures is the following: 1 Sites 2 Region 1 3 Site 1 4 Spa 4 Sea View 2 Region 2 3 Site 2 ...Show All
