I have a stored procedure, which I cannot change (it is used by older programs). It is passed an int of 15 and then an ID is generated and written to a database table. The created ID is then suppose to be selected and returned.
The INSERT does not seem to be working. I'm not getting the created ID value from my code, I am getting the value I passed to the procedure when I get to this
line of code "sessionID = sessionProcedureID.Value.ToString()";.
Below the stored procedure and my code.
/***************Stored Procedure***********************/ USE [testDataBase] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[MakeValue]
my doubt is :- in what data type the intermediate result of an expression is stored? like for expression 2+3*1/2 , i think the intermediate result for 1/2 is stored in the form 0.5 but for expression 2+3*1/100 , i think the intermediate result for 1/100 is stored in the form 0.01 so i am not sure if the compiler use dynamic type ie, changes with need. or it always stores in high precision like:- for 1/2 its 0.5000 and for 1/100 also 0.0100 or something like that.
How would I go about shrink the duplicate data set from CWorksheetTwo? For CWorksheetTwo has both CUser and CUserEx, and I only need CUserEx, and all other classes are happy with CUser
Since there is no such thing virtual variable what are my choices? In CWorksheetTwo set users to NULL and use another exclusively? Change CSettings variable to template <class T> std::vector<T>users?
Ok so when the program runs the first function the data is stored and displayed in the file. The second function is supposed to read the name entered, compare it to the ones in the file then take the price with it BUT I seem to have done something wrong when reading the files (or maybe it has to do with the global function I'm not sure). Here's parts of the code :
I'm doing a bitwise operations on 2 bytes in a buffer, then storing the result in a variable. However, I sometimes get a non-zero value for the variable even though I'm expecting a zero value. The relevant portion of the code is as follows.
Code:
unsigned int result = 0; long j = 0, length; unsigned char *data; data = (unsigned char *)malloc(sizeof(unsigned char)*800000);
[Code] ....
I'm expecting result to be zero when my data[j] and data[j+1] are 0xb6 and 0xab respectively, which is the case for most of the time. However, for certain values of j, my result is strangely not zero.
Code:
j = 62910, result = 64 j = 78670, result = 64 j = 100594, result = 64 j = 165658, result = 512 j = 247990, result = 128 j = 268330, result = 512 j = 326754, result = 1 j = 415874, result = 256 j = 456654, result = 1024 j = 477366, result = 512
It appears that these strange result values are all powers of 2, with a 1 bit appearing somewhere in the unsigned int.
I'm not changing the value of result anywhere else in the code, and when I print out
I'm trying to create a web service that uses a dataset called dsPeople, but it doesn't seem to know where it is, and gives me a directive/namespace error underneath it where it occurs. Do I need to declare it somewhere or something?
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; using System.Data; using System.Data.OleDb; namespace WebServiceTest
what I need to do is load a dataset with the most recent record for each item in the database table. Each item has an ID, location ID and date along with some numeric data. the item ID, location ID, and date is referenced in each record of the table. So each item will have multiple records with different dates that could be anything. To make things worse there may be the same item in multiple locations. and each locations items most recent record needs to loaded in to the dateset and then displayed in a data grid. At a later time there will be a location sort as well so only items in a particular location or group of locations will be loaded. More question on the data grid to come.
I have a button that calls a delete stored procedure with only two parameters. I can run the stored procedure via SQL manager and know it works. But, when I call the stored procedure from a sqldatasource on the .aspx page I get this error: Procedure or function has too many arguments specified.
I have a certain piece of code that I want to run every 2 minutes. One of my ideas is to get the time and modules that with whatever number represents 2 minutes. Would this work?
I hope that this isn't an elementary question to you more experienced people, but I am having some trouble with my .DLL file. I haven't ever had a problem with compiling and linking it with my main project before, but it appears now some sort of problem has started. The message that appears is :
I have no qualms with posting my .DLL source, as it is not particularly long or complex. It seems the problem functions are the last two I've added ( load_sound( ) and play_sound( ) ).
Here is what I'm linking it with :
Code:
-------------- Build: Debug in game (compiler: GNU GCC Compiler)--------------- mingw32-g++.exe -shared -Wl,--output-def=binDebuglibgame.def -Wl,--out-implib=binDebuglibgame.a -Wl,--dll -L"F:FBLARandom gamegame.dll.sourcegame" objDebugconversion.o objDebugprojectile.o objDebugSDL_utility_functions.o objDebug ime.o -o binDebuglibgame.dll -lSDL -lSDL_mixer Creating library file: binDebuglibgame.a
Output size is 49.10 KB Process terminated with status 0 (0 minutes, 0 seconds) 0 errors, 0 warnings (0 minutes, 0 seconds) projectile.c :
I want to search the numbers for the Index number of 1154
The search will return a True if I can find 3 or 4 same digits between the Index number and the 8 numbers
The search also have the following criteria -
meaning that -
1154 when compared to 1154 == true 1154 when compared to 1179 == false 1154 when compared to 2154 == true 1154 when compared to 2554 == false 1154 when compared to 2484 == false 1154 when compared to 2144 == false 1154 when compared to 4515 == true 1154 when compared to 1144 == true 1154 when compared to 1517 == true 1154 when compared to 4815 == true 1154 when compared to 1481 == true
the index number can also be of type - 1234, 1123, 1112, 1111
I am/we developing in C and we have a number of different programs. We also have problem to keep track of different versions of a specific exe file.
Is there any way to add version number when build a file so the version is added in the properties.
I doing this in a MFC c++ project in a .rc file. Is there a way (or a similar way) of doing this in C? Here its stored in the details section with product version 6.0.8:
I know that memory addresses in the stack can contain either values or references to other memory addresses, but do these memory addresses also contain methods or are the methods themselves located in the heap?
The confusion comes from the fact that in C# a delegate variable can be assigned either a method's identifier, an inline function, a lambda expression, or a new instance of the delegate type with the method's identifier passed as an argument to the constructor. My guess is that assigning the method's identifier directly to the delegate variable is just a simplified way of calling the delegate type's constructor with the method's identifier as an argument to the parameter, something that the compiler handles for you.
But even in this last case, the delegate variable is said to point toward the method itself. In that case, does it mean that methods are stored in the heap, just as reference type values are?
Making a game of checkers on C++ win32, visual studio
when i want a piece to move, i type:
cout << "What piece do you want to move? (C4)" << endl;
i type in 'cin' after to get the players input, but how do i get it to store the players input in a certain variable? im going to have a list of variables:
string a1 string a2 string a3
etc
so if the user types in a2, it automatically goes to that variable and then asks the user "where do you want the piece to be moved to?".
So I'm trying to delete a value stored inside one of my vectors but I can't accomplish this. My attempts are down below. I've commented out one attempt since it gives me errors. How can I do what I am trying to do?
#include <iostream> #include <vector> using namespace std; int main() { vector<vector<int> >row; vector<int> newColumn;