sparra06's Q&A profile
Visual FoxPro Date problem in VFP 6.0
Hello! Huh, I currently have field named 'fine' in my DB. It's used to store fines. There two other fields, 'rent-date' and 'no_of_days'. The first one stores the date on which the rent of a book starts and the second one stores the number of days the book is going to stay with the borrower. Well, I would like to know how can I calculate the fine. To calculate it, I must find by how many days the due date has been "excessed" and then multiply it by a fine of 10 per day. I must do it without adding a 'due_date' field. Can anyone suggest a piece of code I have tried using the date functions...but I have messed up everything. ...Show All
Windows Forms odbc connection porblem
hi master sir i create odbc connection with oracle connection test and work right but when i export data form sqlserver 2000 to oracle with odbc connection and user scott/tigger that time syetem not export data and give me error Failed to copy 1 Double-click the error row for a detailed description of the error When click on error then show blow error [oracle][ODBC][ora]ORA-01918: user ‘scott’ does not exist sir please give me idea how i export my data to oracle thank aamir ...Show All
SQL Server SP Permissions
Currently to set a execute permission on a SP, you execute this: use [mydb] GO GRANT EXECUTE ON [dbo].[myStoredProcedure] TO [myUser] GO Is there anyway to loop through all the stored procedures in a database and assign execute to all of them for a certain user Don't forget to add a where clause if needed: where ROUTINE_TYPE = 'PROCEDURE' Limits the results to only stored procedures. ...Show All
SQL Server MCTS Exam 70-431 Database Administration Study Documementation and Samples ?
Hi, I am looking for good documentation and examples to use to 'study' for Microsoft exam 70-431. This has everything to do with nuts-and-bolts Database Administration of SQL Server 2005. The December BOL examples, do not cover enough topics. The topics that are covered are not in enough detail. The 70-431 exam requirements are very detailed. This seems to be a nuts-and-bolts test. I am looking for nuts-and-bolts study material. No books are published yet. Does anyone have any good ideas on where to find 'good' samples and tutorials meant for a person who is studying for the new Microsoft SQL Server 2005 Database Administrator ...Show All
Windows Forms How to add a launch condition based on whether a task is running
I want to add a launch condition, so that the install will not continue if my program is already running. I have seen lots of documentation on how to search for a file and use that for a condition. Is there a way to get a files state, or to check for a process. I am using VS 2005 to create my setup. There's nothing in a VS setup project to do that. BTW, if the running process you want to look for has a window, Windows will prompt the user to close the app anyway, just in case that's what you're worried about. ...Show All
SQL Server SUM is summing like values
The problem with my SUM below is that I don't want it to sum up like amounts. For example, there may be multiple rmstranamt showing but if in the list there are 2 that are alike, just sum up one of them along with the others. In other words, I need to somehow do a grouping of the rmstranamt so that I'm not summing up one unique number twice in my SUM. Example output. Lets say my query finds 3 rmstranamt records for a particular account. Right now it's taking 3265.12 + 3265.12 + 3000.50 which is not right. I need just 3265.12 + 3000.50 and to ignore the other duplicate 3265.12: 10 3265.12 10 3265.12 10 &n ...Show All
Software Development for Windows Vista ASP.NET And a State Machine Workflow
I recently read the MSDN magazine article, Windows Workflow Foundation, Part 2 (http://msdn.microsoft.com/msdnmag/issues/06/04/CuttingEdge/), where Dino Esposito demonstrates how to work with workflows in ASP.NET. Dinos' demonstration provides a helpful solution to working with Sequential workflows; however, it left me a little confused with how to work with a State Machine workflow. In the article, Dino demonstrates how to pass parameters to a Sequential workflow by using a Dictionary object, which is then passed as a parameter to the CreateWorkflow() method. The problem is that State Machine workflows pass parameters throug ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Using surfaces
Please, tell me about surfaces ( Microsoft.DirectX.Direct3D. Surface ). What is it, how can I use it. With examples, of course. It's essential that you take a look at the DirectX documentation. It has a wealth of information. From the DirectX documentation. "In Direct3D, all two-dimensional (2D) images are represented by a linear range of memory called a surface. A surface can be thought of as a 2D array where each element holds a color value representing a small section of the image, called a pixel. An image's detail level is defined by both the number of pixels needed to represent the image, and the number of bits needed ...Show All
SQL Server Problem with concurrent insert and update commands
I've got a quite simple data task. It extracts data from source, performs a few lookups and finally redirects the rows based on whether they should be inserted to or updated (if they already exists but has been changed) in the destination database (which is hosted by sql server 2005 sep CTP). I use a conditional split transform, which splits the rows in two separate outputs: - the first goes to an ole db destination which simply inserts the rows into a database - the second one goes to an ole db command which updates the same database Everything is doing well as long as there are just rows of one type, I mean only rows that s ...Show All
Windows Forms Shell Extension Context Menu in C# strange error.
Hi, i'm writing a shell extension in c# that will add two menu's to the right-click menu of explorer. Here is the problem. If i select one file and use the standard OPEN context menu all is well, but if i select two or more files and use the standard OPEN context menu it seems to want to run through the code for MY created menu. Here is the code in question: int IContextMenu.QueryContextMenu(uint hmenu,uint iMenu, int idCmdFirst,int idCmdLast,uint uFlags) { // The first id to use (should be 1) int id = 1; if ((uFlags & 0xf) == 0 || (uFlags & (uint)CMF.CMF_EXPLORE) != 0) { // Create a new Menu Item to add to ...Show All
Visual Studio Express Editions Reference an Array using a String Variable
I want to be able to pull an array using a string that I built. Is there any way to do this Here is my example code: dim ary1() as string dim ary2() as string private sub test() dim totalLength as integer dim i as integer totalLength = 0 for i = 1 to 2 totalLength = totalLength + getAryLength(i) next i end sub private function getAryLength(i as integer) dim ary as string ary = "ary" & cstr(i) 'This is the part where I want to be able to reference the array by use of a string whose value is the same as the name of the array. This onbivously doesn't work. Any suggestions/help getAryLength = getUpper( ary ) en ...Show All
Windows Forms Closing/Opening/Switching Forms
Ok im sorta new to VB 2005-im used to 6.0. How would I write this 6.0 code in 2005 : (this code is executed from Form1 to go to Form2) Load Form2 Unload Me Form2.Visible = True all this does is switch between 2 Forms, but i dont kno how to do it in VB 2005! could somebody please help! You can set your project up to support more than one main forms. Your other option is to impliment your 'main' forms as user controls and switch their visiblity on the main form. ...Show All
Visual C++ Candidate function(s) not accessible strange case
When trying to call a __gc class static function in an assembly which has CLR and non-CLR types in its signature, I get a Candidate function(s) not accessible error. In an assembly, using /clr:oldSyntax: TSEShared.h -------------- // TSEShared.h #pragma once #include <string> using namespace System; namespace TSEShared { public __gc class Global { public: static std::string ToCppString(System::String *); }; } TSEShared.cpp ---------------- #include "stdafx.h" #include "TSEShared.h" std::string TSEShared::Global::ToCppString(System::String * str) { if (str == 0) { return(std::string()); } System::In ...Show All
Microsoft ISV Community Center Forums Code erroring out.
Ok here is the code that is breaking: If Range("useSP").Value = "Y" Then startpoint1 = 1 startpoint2 = 1 Else startpoint1 = 144 startpoint2 = 943 End If 'Inputing formulas and making needed properity changes For x = 0 To 142 With Sheets("Pyramid Evolution").Range(Range("SalaryPointPE").Cells(startpoint1 + x, 1).Value) .Formula = Range("SalaryPointPE").Cells(startpoint1 + x, 2).Value .Interior.Color = Range("SalaryPointPE").Cells(startpoint1 + x, 3).Value .Locked = Range("SalaryPointPE").Cells(startpoint1 + x, 4).Value End ...Show All
Visual C++ After the machine automatically updated itself last week, I started getting this:
Microsoft Visual C++ Runtime Library Assertion failed! Program:...am Files\Microsoft Office\OFFICE11\WINWORD.EXE File: .\scoring.cpp Line: 133 Expression: ret For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts (press retry to debug the application - JIT must be enabled) I am a medical transcriptionist - I have no idea what any of that means - I just want it fixed right away. I use my computer to do my work and now Office and Outlook are both messed up as I keep getting this message pop up. No doubt this is posted in the wrong place. It is so difficult t ...Show All
