pjks100's Q&A profile
Visual Basic Creating Relations within a Dataset
im having a bit of trouble creating relations my dataset has 3 tables (client, episode, appointment) one client can have many episodes, and any 1 episode can have many appointments Client (0) INUMBER - primary key Episode (1) ENUMBER - primary key INUMBER - foreign key Appointment (2) ANUMBER - primary key ENUMBER - foreign key so i thought to set up my relations i would only have to do the following:- dsResults.Relations.Add( "NodeRelation1" , dsResults.Tables(0).Columns( "INUMBER" ), dsResults.Tables(1).Columns( "INUMBER" )) dsResults.Relations.Add( "NodeRelation2" , dsResults.Tables(1).Columns( "ENUMBER" ), dsResults.Tables ...Show All
Windows Forms Remove Controls from the TabIndex
Hi all, is there anyway I can remove a Control from the TabIndex without disabling it I have set the TabIndex to 0, but they still get tabbed. If I use -1, then I get an error in the designer. Hope you can help. Thanks Tryst Yeah, I did find this in the properties in the Design view, thanks. I should have looked, but thanks for the info. Tryst ...Show All
SQL Server SSMS-EE: Creating and Using Stored Procedures - T-SQL Error Messages 111, 156, & 102
Hi all, I tried to use the SQL Server Management Studio-Express Edition to execute the following code statements: --- SQLQuery.sql--- USE testDB DECLARE @procID int DECLARE @procName varchar ( 20 ) DECLARE @procType varchar ( 20 ) CREATE PROC sp_getRecords AS SELECT * FROM Inventory CREATE PROC sp_insertRecord @procID int , @procName varchar ( 20 ), @procType varchar ( 20 ) AS INSERT INTO Inventory VALUES ( @procID , @procName , @procType ) CREATE PROC sp_deleteRecord @procID int AS DELETE FROM Inventory WHERE ID = @procID CREATE PROC sp_updateRecord @p ...Show All
Visual C++ <stdlib.h> problem
Hi all. My problem is this... I am using Visual Studio.net 2003. Im creating a program that uses a dynamic array of structures. but when i include the header file <stdlib.h>, i get the following error: c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\stdlib.h(256) : error C2381: 'exit' : redefinition; __declspec(noreturn) differs c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\glut.h(146) : see declaration of 'exit' c:\Documents and Settings\Daniel Travers\Desktop\latesttest\latesttestsrc.cpp(301) : error C3861: 'exit': identifier not found, even with argument-depen ...Show All
Visual Studio Team System Unit Testing Issue - comparing structures (probably any objects)
I have a web service method which returns a structure. In order to test that the correct data is being returned, I call the method and then populate an identical structure with the same data. It appears however that there is no way to get the unit test to identify them as identical. I had to compare each and every property of the object in order to determine that they are identical. Is there any easy way to do this Thanks. Jeff Hi Jeff, If they are "struct"'s, you should be able to use Assert.AreEqual(StructDataExpected, StructDataActual, "My error Message") to compare the two structures. Behind the sc ...Show All
.NET Development Best encryption/decryption for strings
I am looking for the best way to encrypt and decrypt a password. I looked into RSA but it gets too messy when you can only encrypt one letter at a time and get a byte[ ] back etc... Anyone know anything easier whether it is a built-in encryption/decryption or some class typed up from scratch Pref. something where you hand it a password and it encrypts the password into another string and vice versa but is just about as secure as this built in RSA. Thanks! ~Lauren What do you mean by "one letter at a time" e.g. string text = "abcdef" ; Console .WriteLine(text); // encrypt RSACryptoServiceProvider ...Show All
Windows Forms Copy/Paste/Delete/Undo in a MainMenu
How can I utilize these commands using a MainMenu as seen in most of today's applications Sure, but keep in mind that you don't have to literally store a "text" value in your tag -- since it is of type Object you are able store whatever you like! This can be an important tip to keep in mind for a variety of ...Show All
Visual C# don't understand AppDomain.CurrentDomain.SetPrincipalPolicy
Hi, I don't understand what: AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal); Is made for. Thread.CurrentPrincipal return always the same with ou without that piece of code. Does anybody has an example demonstrating a difference thank you OK thank you Vikram. Your link is very interesting and help me to clarify some details. I also disassembled some classes like thread, appdomain and httpapplication and I thing I have clear ideas now on what happened. In fact there is 2 cases: If the application is hosted by ASP. IIS authenticate a user (possibly anonymous) an HttpContext is created and passed to .NET a ...Show All
SQL Server Problem with date format
Hi! I have a string with date parameters. Those date contains Hours/Minute/Second and i juste want the date without the time. So i have tried this: =Format(Parameters!StartDate.Value, "d") & " to" & Format(Parameters!EndDate.Value, "d") But this return me: d to d What i want is something like this 2000-01-01 to 2006-01-01 How can i do this Thanks Thank for your answer. You're right. Those dates come from parameters so they were in string... i've put a CDATE before the FORMAT and now it's working fine. Thanks ! ...Show All
Visual Basic String function
Forgive me for this probably simple question, but is there a predefine function that will return part of a string. ex. If s is a string value of "basic" and I wanted to return just the first letter "b", is there a predefine function that will do that That is correct. Left$, Mid$ and Right$ are all functions that have existed in many different versions of Basic including VB6 and even way pre-dating Visual Basic, I look back to many of the versions of BASIC that existing in the 80's such as the Sinclair, TRS, Dragon, BBC Micro&nb ...Show All
Visual Studio Team System Mixing relative and absolute paths
Hi, In FxCop 1.32 you can either have relative paths within a project using the shared project option, or have all paths be absolute. I would find it really usefull if there was a way to use both kinds. I want to have relative paths for the assemblies to analyze and absolute paths for any custom rules assemblies. Is there a reason why this is not allowed /Johan If you mix absolute and relative paths, yes, the GUI will blast this information on a project save. If you move to using environment variables to represent absolute paths, this information will not get blown away. The downside, of co ...Show All
Visual Studio Team System "Index was outside the bounds of the array" on refresh Team Explorer
Hi, A message box saying that the "Index was outside the bounds of the array" pops up each time there is a refresh of the Team Explorer panel. Everything still seems to work fine though. Anyone knows what is going on I assume it is a problem at the Team server since all the Visual Studio working on that Team Project have the same message when doing the refresh. Pierre People ... your answers are pretty much confusing !! well pd42 the problem is that you are retrieving a single value (Scalar) from the database and you put it in a reader like SqlReader. Example SqlCommandName .CommandText = "Se ...Show All
Visual C# Set RegistryKeyValue For All Users?
hi how i can set keyvalue on registry..so it will be read for all users..on system..for example if have 2 users (administrator (default)..and (user))..i want to set key value on registry..and be seen by the two users without setting the keyvalue twise... please help.. Thanks Bassam Basamad There is no All Users key for the registry. If you want to store a value that all users see then you should use HKEY_LOCAL_MACHINE. Otherwise you have no choice but to enumerate the HKEY_USERS subkey and set the entries for each user. However security may cause you problems here. Fortunately however, barring security, the code is a si ...Show All
Visual Basic Prevent Hex Editing!
i even somewhat hard coded the word Me.Text = "BLAH" If Me.Text <> Chr(66) & Chr(76) & Chr(65) & Chr(72) Then 'That all means BLAH in character form Call MsgBox("This program has been altered from it's original content and will now close!", MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, "BLAH ERROR") End End If i downloaded hex workshop, edited BLAH to something like MAIL, and it still works. but if i have the workspace open and before i debug it, if i manually change it to MAIL in the "Me.Text = " part, then the message box will pop up stating so. what am i doing wrong, logically, t ...Show All
Smart Device Development Resource Manager not working in Compact Framework v2.0 and Pocket PC 2003 SE Emulator
Hello all, The ResourceManager class will not find a resource under the Compact Framework v2.0. However, this used to work under CFv1.0. Let me elaborate on my problem. I have my main program in main.dll and a resource with name 'Messages.en.resources' in main.resources.dll. Here is the code in the main.dll: ResourceSet _msgs; ResourceManager rm = new ResourceManager( "Messages", Assembly.GetExecutingAssembly() ); try { _msgs = rm.GetResourceSet( CultureInfo.CurrentUICulture, true, true ); } catch( MissingManifestResourceException ) { _msgs = null; } if ( _msgs == null ) { &n ...Show All
