John Dekker's Q&A profile
SQL Server Query Question for a real Guru
Hello, I've been trying to fill a tree view based on some criteria in another table. I have the standard table with a ID - ParentID - Text when I bind the table everything works fine. What I need to do is display only the tree items based off a username and ID in another table. Files can be found http://www.cthere.com/treeviewhelp.zip EXAMPLE: tblTourgroup(UserName = Jim) tblTourgroup (GroupID = 110) tblGroups (GroupID = 110) Results from tblGroup: - RESTAURANTS - Cuisine - Steakhouse Query Results should be layed out like tblGroups Any ideas This is what I have so far... But it does not traverse up and get the other nodes.. USE SQL2005_335573_cplanet; GO WITH DynamicTree (ParentID, GroupID, GroupName) AS ( ...Show All
.NET Development How to detect if MS-Out application is open?
I wrote this code to detect whether MS-Outlook application is opened or not. Dim oProcess1 As New System.Diagnostics.Process Dim bOutlookExist As Boolean = False 'Can check for 1 or more running "MS-Outlook" daemon... For Each oProcess1 In Process.GetProcesses() WindowsEventLog("Debug #1 --> " & oProcess1.ProcessName, "WARNING") If oProcess1.ProcessName.Trim.ToLower.Equals("outlook") Then 'WindowsEventLog("Debug #4 --> " & oProcess1.GetProcesses.ToString, "WARNING") bOutlookExist = True Exit For End If Next Then I disovered that this process would still be running if MS-Outlook application is closed. That become a problem. ...Show All
Visual C++ Space separated String...need to parse
Guys, I'm at a point where I have a string that comprises of multiple IP addresses separated by a space (or a comma, whatever I have control over that). Now, I need to parse that string to pull out each IP address separately. Is there an easy way to get this done Or do I have to do it the hard way using one of the low level string operations. I'm working with C++. You can use strtok function from C Runtime Library see MSDN for code sample and description ...Show All
Visual Basic Timer within Windows Service not working
Hi world, I have been working on a very simple windows service, that has a timer and every time it ticks it is supossed to add a line to a text file. After I installed the service and I run it, It adds a line in the onStart ()and in the onStop() methods, but it doesn't do anything when it ticks. Please, could somebody help me Thanks !!!! Imports System.ServiceProcess Imports System.Diagnostics Imports System.IO Public Class AutoRebootService2 Protected Overrides Sub OnStart( ByVal args() As String ) ' Add code here to start your service. This method should set things ' in motion so your service can do its work. Timer1.Interval = 1000 Timer1.Enabled = True archivoLog( " ...Show All
Visual Basic O'kay so I now have a working application. How do I port it to other computers?
I can install VB 8 onto other computers along with my application, but that seems unusual. The other PCs never will be programming in VB. They want to just use my application. Question: Please explain to me in a step-by-step button clicking and dragging fashion how to do this. More Simple To Vb menu click build. Then outside the vb open the folder of Yr app. You'll find there a folder bin and there You have the exe file. Just run it and everything is ok ...Show All
SQL Server shrink my Database
Hello anybody Help me I am new for working Database side MyDatabase name is 'DS' i need to shrink my Database and files through stored procedure. How to shirnk my Database. can anybody help me thanx kiran No i will not do manually system automatically do every week one time only. can anybody help me i really dont know how to do this is. i need to shrink my MDF and LOG.. thanx ...Show All
Visual Basic VB Classes
Using A Class In Viusal Basic [Part I of VI] OOP Basics-basic Rudimentry Elements This Will teach you about classes, the basics to OOP and create an application that uses a class. These lessons will build on each other and eventually make an application that uses a class for star wars troopers and how to publish an application. INDEX [PART I - INTRODUCTION TO OOP] [PART II - INTRODUCTION TO ENCAPSULATION/PRIVATE/PUBLIC KEYWORDS/FIXING THE CODE] [PART III - METHODS/CONSTRUCTORS/OVERLOADING] [PART IV - PROJECT:TROOPER] [PART V - CODE STRUCTURE] [PART VI - FINAL TOUCHES/RELEASE] What is OOP OOP stands Object Oriented Programming. It uses objects from the real world in classes. What is A Class A class is a design for an ...Show All
Visual Studio 2008 (Pre-release) Schema Crawling Question
Hey there team, If I wanted to get the names of fields that comprise a key, what's the preferred way of doing that :) I've been crawling around in the MetadataWorkspace, and boy there's a lot there. Might be beneficial to have some sort of post that outlines the big concepts with this namespace... Thanks! Mike You need to look for the type in "CSpace", not in "OSpace" (of course, those terms are not supposed to surface in the API :), so you may need to tweak the function a bit in order to find the entity type. Pablo Castro ADO.NET Technical Lead Microsoft Corporation ...Show All
SQL Server Refresh default value
Hello, I have report parameters B with default from query. This query depend on other report parameters A that updates befor report parameter B. While user open the report and update report parameter A, the report parameter B get default value with the right default value but when user change his selection in parameter A, the default value in parameter B doesn't changed Any idea Smashing values that the user selected (either explicitly or implicitly by not changing the default) is usually considered to be a bad thing.There exist uncommon cases where the author of the report can reasonably know the user would expect their previously selected value will be overridden. Unfortunately, RS c ...Show All
SQL Server How to get the SQLEXPRESS GUID ?
Hi, please can someone be so kind and tell me the fastet way to get the GUID of the running SQLExpress instance Sincerely,gonzo883. I mean the GUID of my SQLExpress server, I need the GUID because I want to use SSL encryption and to register SSL via httpcfg so I need the GUID. Sincerely,gonzo883. ...Show All
Visual Basic Passing arrays from vb .NET to ActiveX control (*.ocx)
I have an application written in Visual Basic 6 that uses an ActiveX control written in Visual C++ 6. I'm moving the visual basic 6 application to visual basic .NET (2003). The problem is when I try to pass an array from the visual basic code as a parameter of a function of the control. In Visual Basic 6 the code is something like this: Dim dummy(10) as Long '... 'some code '... myActiveXControl.myFunction(dummy(0)) myFunction expects a reference of the first element of an array of Integers. Passing the first element of the array works fine in visual basic 6. But if I try the above code in vb .NET, changing the definition of the array for this one (type Long in vb 6 is Integer in vb .NET) : Dim dummy(10) as Integer ...Show All
Visual Basic Errors, Warnings, Messages
Hi, When I bring up the Error List window, I get the options to display Errors, Warnings, and Messages. I know what errors and warnings are (as I have had several ). But, I have never seen a Message. What constitutes a message Hi, If you change your destktop screen resolution you will get a MESSAGE like "Do you want to keep these settings Yes | No" with a countdown timer appearing, is one example. Regards, S_DS ...Show All
SQL Server Connect from sqlce 2.0 to sql server 2005
I want to connect sqlce 2.0 to sql server 2005. From "Connectivity Tools for SQL Server Compact, SQL Server Mobile, SQL Server 2000, and SQL Server 2005", I know I should install sql server 2005 without the replication components. I do it, then i find i can not create publication. Without replication, how can i synchronize between sqlce 2.0 and sql server2005 Anyone can help me Thirst for your answer. ...Show All
Visual Basic DLL library and "entry point" error
I am new to Visual Basic and am trying to create my first DLL library. I have been following the threads on this forum and have try to implement some of the solutions suggested as best I understand them. However, I am not seeing the answer yet. The source code below is the entire content of the DLL: Public Class Class1 Public Sub test(ByVal myText1 As String, ByVal myText2 As String) ' Do nothing and return. End Sub End Class The above code is compiled as test.dll in folder c:\temp. The calling routine is a form with a single button. The code is as follows: Public Class Form1 Private Declare Sub test Lib "c:\temp\test.dll" (ByVal myText1 As String, ByVal myText2 As String) Private Sub Button1_C ...Show All
Visual Studio Unable to debug unmanaged C code
Hi, I have a solution in VS2005 that comprises of a main vb.net project and an unmanaged C DLL, the linkage being via dllimport. I have my vb.net project set to allow debugging of unmanaged code and my C project set as mixed, but no matter what try I cannot get the source displayed when I step into the C DLL. Any ideas Yes, that's correct, I tried building with the pdb and setting the path for that explicitly but still no joy. It just says "exports loaded" (also, in desperation I made every single function in my code an export just so I could start to see where in the DLL it was - yep, really desperate!!) ...Show All
