Mr.Analogy's Q&A profile
SQL Server new at this, question with variables in trigger
Hey all; Taking a college class, but I'm having difficulty with use of variables. The question basically just wants me to update the inventory amount if an item is ordered. I can do that OK (so I'm not cheating), but I though I would add some bling - and check for the case where more was ordered than was available. I cant get the variable definition down, though, so I can use them in an if statement. Please consider the following; IF EXISTS ( SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID ( N '[dbo].[trg_line_prod]' )) DROP TRIGGER [dbo] . [trg_line_prod] GO CREATE TRIGGER trg_line_prod ON dbo . LINE FOR INSERT AS DECLARE @NumProdAdded INT , @NumProdAvail INT ...Show All
Visual C++ Saving a vector of Objects
I am saving data that is stored in a vector of objects. Currently I am witting them to a text file. I would perfer to write them to a binary file. How would I go about doing that. If it is an MFC application, and your objects are derived from CObject , and your vector is of CObArray or CTypedPtrArray< CObArray > type, then I think you can store objects in binary format using "serialization" technique. For instance: CObArray myObjects; CFile file(_T("C:\\MyFile.data"), CFile::modeWrite | CFile::modeCreate); CArchive archive(&file, CArchive::store); myObjects.Serialize(archive); archive.Close(); file.Close(); I hope this h ...Show All
Visual Studio How to create a snippet function
Hi, I would like to know how can I create and nest a function inside the <Function/> element in a snippet definition The switch snippet has a nice GenerateSwitchCases function to generate dynamic snippet code. Is it possible to create my own function like that Thank you very much, Jaco In Visual Studio 2005, it is only possible to use the predefined snippet functions. Allowing users to have the ability to write custom functions is something we would like to do in a future version of Visual Studio. Thanks, Sean Laberee ...Show All
SQL Server Could Script Task Component uses a Framework 1.1 assembly?
TIA Yes, it can - we did some testing. But you have to copy it to SYSTEM\assembly and register it in GAC (gacutil.exe). HTH ...Show All
Software Development for Windows Vista Outlook 2003 or 2007 RPC/Http using Vista
I use 1and1.com and a hosted exchagne account. My old machine (XP/Outlook 2003) could connect to the Exchange server using RPC/HTTP and a hotfix from MS. Now that I have upgraded to Vista, I am not able to get to the Exchange server. is there a simlar hotfix that will allow the HTTP tunnel or is there some config in Vista that will let me achieve this using Outlook 2003 Bonus, I have a copy of Outlook 2007 which I would like to upgrade to as well, but 1and1 does not yet support this, at least not in tech support. In thinking this through, this is actually a windows issus vs. outlook (I think) so if i can get vista working, then theoretically Outlook 2007 shoudl work as well. Thansk t.a. I am having this exact problem wi ...Show All
Visual Basic String Functions
I am experiencing something very strange in a VB.NET project I am working on. The string functions Left(),Instr(), Right(), etc. do not work, and others, like Replace, do not work correctly. Is this a case of class pollution If so, how to deal with it There must be a conflicting class in my project, because even using imports microsoft.visualbasic in the form does not correct the problem. The Left function appears to get or set an integer related to object coordinates. By using a the full namespace reference, I can get it to work, but what a pain! LSet does work, though, so I can use it instead. Thanks for the help! ...Show All
SQL Server waittype NETWORKIO blocking spid on SQLServer 2000
I have a series of processes being blocked - after running sp_blocker_pss80 I can see that the blocking spid is coming from a batch program that is issuing a 'sp_prepexec' event and has a waittype of NETWORKIO. It looks very like the problem fixed by hotfix: 884554 in SP4. The db is SQLServer 2000 and running the following command: SELECT SERVERPROPERTY('ProductLevel') GO Gives the result SP4 So I guess I have the hotfix but I'm still experiencing this problem. The event that is 'blocking' is a select statement on a large table. Running the same batch process on identical data in a test environment doesn't give the same problem. I'm not certain that other processing on the test environment is identical though so it is ...Show All
Visual FoxPro foxpro for windows
sir, i hope i am not troubling you all. i have installed foxpro for windows 2.6 on win 2000. but i am not able to run foxprow.exe. i get error "divide by zero or overflow error" how to fix it. u have to apply the patch to foxpro 2.6 (windows) it to work in windows 2000 / XP http://support.microsoft.com/kb/240982 http://support.microsoft.com/default.aspx/kb/102893 once u apply the patch it will work fine in any version till Windows XP SP2 ...Show All
Visual C# Thread Safety and Collection Problem
Hello, I'm working on a Network Application which holds all the connected clients in a Dictionary (Collection) and when Clients connect or disconnect this collection needs to be Modified as per requirement. All works fine with small work load e.g if a single client connect or disconnects or may be 2. But when a bunch of Clients say 30 disconnect altogether then I get Excetpion Collection Modified, Enumeration Operation may not execute come thing like this. I know this is all due to Thread Safety where multiple disconnection occurs. I have used lock and thought its enough but I'm getting this error. Here is my Code: public void Disconnected( ClientProxy sender, EventArgs e) { try { lock (clientProxyDictiona ...Show All
Visual Studio 2008 (Pre-release) CLR -> XML namespace mapping bug
Hi, I have found what I believe is a bug in the CLR -> XML namespace mapping functionality. I am trying to map a namespace in the current assembly to an XML namespace like this: xmlns:local="clr-namespace:MyProduct.MyNamespace" This works fine as long as the current assembly isn't signed. If it is signed, an exception is thrown: {System.IO.FileLoadException: Could not load file or assembly 'MyAssembly, Version=1.0.2497.20670, Culture=neutral, PublicKeyToken=null' or one of its dependencies. <snip> It appears as though a weak name is assumed ( PublicKeyToken=null ). Regards, Kent Boogaart PS. I also tried using the XmlnsDefinitionAttribute to map the CLR namespaces to the XML namespace, but this doesn ...Show All
SQL Server Automating SQL Profiler
The powers at be have decided that they would like to automatically run a trace on one of our analysis servers when it processes a cube in the early hours of the morning. Now I have no problem creating a SQL Profile to run and store the results in a database table for them, but I have no idea how to automate it so that it runs everyday, any help would be greatly appreciated. My apologises for posting this in forums SP2 is going to come out with little sample application ASTrace. This tiny sample installs as a service and knows how to subsribe to Analysis Services trace and output this trace into SQL Server table. Drop me a line if you are in urgent need to solve this problem an ...Show All
.NET Development Multiple assemblies -- Single version
Hi, I have several assemblies that I need kept separate. I would however like to have all of them share the same version number. I already tried "sharing" a file with AssemblyInfo in it between them but that worked badly. Any ideas It's murky what exactly you mean. You don't have to put the [assembly: AssemblyVersion()] in AssemblyInfo.cs, you can put it anywhere. So, you could reference a common .cs file in all your projects that just defines the version number. More commonly (and advisably) is to let the major and minor version number designate the common version and let the build number and reversion number vary. That can be done automatically by AssemblyVersion("1.0.*") ...Show All
SQL Server Visual Studio 2005 automatically sets SSIS project as startup project
I have a Visual Studio 2005 solution which contains a Sql Server Integration Services (SSIS) project. In this solution I have explicitly set a Web application project as startup project, but whenever I edit a DTS package within the SSIS project, VS automatically sets the SSIS project as startup project and the package I edit as startup object. Needless to say, this may cause some really unwanted incidents when running the solution - thinking that you're about to run the Web application project (that was explicitly set as startup project), but instead, you run the edited package in the SSIS project. Is there any way to avoid having the SSIS project automatically setting itself as startup project, any workaround here at ...Show All
Microsoft ISV Community Center Forums Calling c# assembly - Works from Excel 2003, not from XP
Hello I have a c# assembly that Iam calling from Excel 2003 VBA. The assembly has 4 dependencies (located in the same folder). All have strong names. I use regasm etc etc. I can call the class/functions in the assembly from Excel 2003, but the code does not work from Excel/Office XP. The error message is : CDCOM.dll or one of its dependencies could be found. Any help is very much appreciated. thank you. va ...Show All
Visual Basic Selected Value in ComboBox Populates DataGridView
'I need assistance on how to Load the GridView By selecting a value in the ComboBox '1. ComboBox is loaded with Satellite SCC #s' From SQL Server 2005 Express '2. The DatGridView is loaded with signals that correspond to the Transponders on the Satellite From SQL Server Express 2005 'The GridView also contains the Satellite SCC #s'. '3. I need the GridView to only load the Signal that Matches the Satellite SCC #s' that are Selected from the ComboBox. '4. So when you click the SCC # in the ComboBox, it will search the Signal Database Table for all the matching 'Satellite SCC #s' and then load the signal information into the GridView. DataBase: SQL Server 2005 express Language: VB.NET 2005 FrameWork: .NET 2.0 Imports System ...Show All
