I created a table called registration and I have set an auto increment ID for each record. The problem is when I delete a certain record the ID didn't remove or deleted, for example if I entered these records: -
1,Bob,Bob123,Bob_2@hotmail.com then if I deleted it the next id record will be 2 which is supposed to be 1.
here is the SQL Command:-
CREATE TABLE Registration ( Reg_Id INT PRIMARY KEY IDENTITY, Name varchar (255), UserName varchar(255) NOT NULL, Reg_Password varchar(255), Email varchar(255), Reg_Rank varchar(255) );
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 have text file with around 10k lines. Each line contains number with length 12-14 digits. I want to take only first 8 digits from each number and writ it in new file.
There are two types of patients. which is: 1. Normal patient. 2. Critically ill patient.
once you added any patient. You will be able to show all patient using "ShowAllPatient;" method. -> i want the Auto-increment ID Number to appear for each patient has been added.
And you will be able to call a patient to provide a hospital services for him/her using "GetNextPatient;" method.
I need to generate an Auto-increment Number for each (patient) has been added. (Auto-increment Number) but it just should be different for each patient. For example the first patient will have 1, The second patient will have 2. etc. The Auto-increment number should appear for each patient.
I have a text box invoice no on windows form and i need to retrieve data from database and everytime user click on the add button the invoice no should increment by 1...
Just wondering if there was a standard way people add a version number to their c++ code? I can just define a variable or #define and write the version number to that, but wanted to know if there is a standard method people use?
I want to select three columns from my text file i.e. Empl No, Start Date and Created Date. After selecting this, I want to insert the data into a database.
I have attached a copy of the text file.
I have the following code so far:
if (File.Exists(filename)) { string[] lines = File.ReadAllLines(filename); for (int y = 0; y < lines.Length; y++) { Console.WriteLine(lines[y].ToString()); }
How do i select specific details for each employee
Later i used trial version of vc2010 and created a static library using the below link. Its worked. [URL] .....
But now I'm using VC2003.Details as follows,
Microsoft Development enviroinment 2003 Version 7.1.3088 CopyRight @ 1987-2002 Microsoft Corporation. All Rights Reserved.
Microsoft .Net Framework 1.1 Version 1.1.4322 CopyRight @ 1998-2002 Microsoft Corporation. All Rights Reserved.
I used the same procedure & created the Static lib. But couldn't use this lib file in my main project.B'cos the project's property window doesn't have the :
Common Properties -> Framework & References
Couldn't find. Here with i attached missed property in VC2003. How can i set this property? Is any other way to use static lib in main project (application)?
I have an EDI file whose structure is given below. This file has multiple records, each record contains a header (e.g EDI.DD.0000000001.20130809), then contents (i.e multiple paragraphs of text) and then footer (e.g End of Report/No EDI Activity). I have to read that entire file using regular expression using three groups.
I am using following regular expression to read the file.
That expression reads the "header" and "footer" in respective groups properly but didn't pick the contents between header and footer in "contents" group.
I have changed the font of header and footer in below file to understand the format. I am using asp.net 3.5 framework.
//------------------Start of EDI File---------------------// EDI.DD.0000000001.20130809
ORIGINATOR INFORMATION Company Name: UNITED HEALTHCAR Identification: 9024125001 Originating DFI: 002100002
RECEIVER INFORMATION Receiver Name: HEALTH & WELLNESS DFI Account Number: 0000000000000001 Receiving DFI ID: 434343430 ID Number: Transaction Type: 22 Deposit
I have a program I have to do that counts the number of words in a text file. I have tried the code on 2 computers now since my programming teacher told me the code was fine. Here is my code:
#include <iostream> #include <string> #include <fstream> using namespace std; int main() { ifstream infile; infile.open("tj.text" , ios::in);
I tried to do this with _spawnl(), but first of all I'm not sure how to properly ask for the path to iexplore.exe, as I'm sure it will change every time MS gets a whim to move it. I know there's a GetWindowsDirectory() call, but that's not where IE resides (its in "C:Program FilesInternet Exploreriexplore.exe" in XP, Lord know where on win 7 or 8).
Also, even temporarily hard coding the path to make it launch with spawnl(), I can't seem to get my html document to display. I know the path to that is right (since I put it there ).
----------------------------------- 45(here is space)string and other shit is here 454(here is space)string and other shit is here 4121(here is space)string and other shit is here 77(here is space)string and other shit is here 45545(here is space)string and other shit is here 1122(here is space)string and other shit is here -----------------------------------
how do i get exactly that number in every line start? and compare but i jus tneed to get them to variable so ?
I've been struggling with this for a while, I have to write a function that accepts a word (in my case the word is "the") and file pointer, and counts the number of times the given word appears (case insensitive) within the file associated with the pointer. This means the two words "the" and "THE" should both be counted.
Here is my code:
int WordCount :: countWords(string wrd) { int counter=0; string temp = ""; while (getline(*file,temp)) { for (int i = 0; i < temp.length();i++) {
[Code] ....
This is what I have come up with, but I get an incorrect value. It was suggested to us to consider using the strcpy() or strstr() functions, but I don't know how to use them.
I have to write a function that accepts a word (in my case the word is "the") and file pointer, and counts the number of times the given word appears (case insensitive) within the file associated with the pointer. This means the two words "the" and "THE" should both be counted.
Here is my code:
int WordCount :: countWords(string wrd) { string temp; int counter; while (!file->eof()) { *file >> temp; if (temp == wrd)
I have a .txt file that contains, together with a few characters, columns of values that I want to save in different files like is written in the program (file 1, file2, file3 - a with x, b with y, c with z). The pattern of the source text file is like this:
Until now I could manage to split the files, but the output gives me only zeros. First the program count the number of lines of the read text file, then it should display the desired columns of double values in three other .txt files.I've got for the three .txt files columns like this:
I'm creating a program to read information about class schedules at my school, reformat the information, and allow the user to search for specific semesters. There are eight fields of information. I'm reading the info from a text file using eight parallel arrays, but I'm having trouble declaring the arrays. I can run this code in one compiler (Dev-C++) with no problems, but I get errors when trying to compile it using Visual Studio stating that arrays must be declared with a constant value. I have a loop to run through the text file, with a counter to increment with each subsequent line, then I create a constant int equal to the counter, and declare the arrays of size equal to the constant int. Here's the section of code in question:
// Counting the number of lines in the text file inFileForLines.open("CIS225HW1DA.txt"); string countLine; int numberOfLines = 0; //Discarding the first line of the text file containing only column headings getline(inFileForLines, countLine);
And the following program that displays block by block:
StreamReader streamReader = new StreamReader("G:LAB123LABWORK2.txt"); int block = 0; while (!streamReader.EndOfStream) { string line = streamReader.ReadLine().Trim(); if (line.CompareTo("") == 0)
[Code] .....
My problem is am supposed to add a verification code so that if i put a string e.g 1:?:? it returns the block where the string is found and gives of all possible answers.
I want to open a command prompt from a console application in a separate window and write some lines of text in the new command prompt.
In the Below code it is not opening the new cmd and not writing the text...
Here is the code: public static int Main(string[] args) { int retValue = 0; try { ProcessStartInfo MyProcess = new ProcessStartInfo(); MyProcess.FileName = "cmd.exe";