8,298 Topics
![]() | |
Hi everybody I wanted to retrieve data from sql server and save them in arrayList I use the following format [CODE] sql="select bookid,bookname from BookTable"; Sqlcommand cmd=new (sql,conn) // I define reader here while(reader.Read()) { list.Add(new book(reader[reder.GetName(0)],reader[reader.GetName(1)])); } [/CODE] in book class I build a constructor [CODE] public book(int id,String … | |
hi there, i have a text box in a form to enter a float value.say that the user types in 1234567789.09 it should be formatted and display as 1,234,567,789.09 how can i do this. i am using a text box. please can someone help me in this or give me … | |
Hi! my dear all. [CODE]#include<iostream.h> #include<stdlib.h> #include<fstream.h> #include<conio.h> #include<stdio.h> class payroll { private: char address[50]; float basic,allowence,deduction; public: void add(void); }; void payroll::add(void) { clrscr(); int e_no,choice; char name[50],ch; payroll e; cout<<"Enter Employe Number: ";cin>>e_no; cout<<"Enter Employe Name: ";gets(name); cout<<"Enter Employe's Address: ";gets(e.address); cout<<"Enter Employe's Basic Salary: ";cin>>e.basic; cout<<"Enter Employe's … | |
Hello community im new! I am really rusty at C# but i do not want to learn the basics all over again so i hit the ground running and ran into a hurdle. I want to use an xml file for a database. Its a car repair tracking system i … | |
In C I have created a program which can archive multiple files into an archive file via the command line. e.g. $echo 'file1/2' > file1/2.txt $./archive file1.txt file2.txt arhivedfile $cat archivedfile file1 file2 how do I create a process so that in my archivedfile I have: header file1 end header … | |
Hi im having trouble linking my database. I dont understand what ive done wrong and keep getting the following message: Syntax error in FROM clause. at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) at................................... My code ive used is: [CODE] using System.Data.OleDb; namespace coursework2 { public partial class Form1 : Form { public OleDbConnection Coursework2; … | |
Writing a program that reads a string of arithmetic expression from the keyboard and evaluates the arithmetic operation in the string. Some example runs are given below. program should accept only * any real or integer numbers * four basic arithmetic operators, +, -, *, / * paranthesis ( , … | |
This snippet takes a string as input and formats it to proper case | |
Hello I was wondering whether is it possible to create a .txt file or check if a .txt file exists inside the folder earlier defined as a path. Basically I have a path : [CODE]#define some_little_file "/User/Joey/Desktop/" [/CODE] and I would like to create and manipulate a txt file there. … | |
I have to create a database with the data stored in a .txt file. Each record is for a company with the following fields: Name, Place, East(km), North(km). Each record from the file needs to be read into a struct array. I have managed to read the records into a … | |
[B][B]i m trying to grant permission to a folder using c#. but can't. i can restrict the folder with following code. plz can any one help me?[/B][/B] //**************** CODE ******************* [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.IO; using System.Security.AccessControl; using … | |
Hi, this i'm trying to make a loop that would read a list of character (including numbers) that you type in terminated by a period and that would only write the letters and ignore the other characters. How would i do this?? Thats the code ive been doing but there … | |
My scenario: I have a requirement in my project(C#).I need to give the user only reading capability for my word document opened thru my application.All other featues like cut,copy,paste,save,saveas,print,right click context menus should be disabled.How can i achieve this in word document programatically using c#? can anyone extend their help? | |
Hello, some of you have have seen me around the site lately picking up some C++ knowledge. I have been reading a book (brief history). I am trying to get involved in dev work for a community I help out. So i took up C++. My assignment has been to … | |
Just register on this discussion community can i get someone to coach me personally? | |
Hi everybody, I am a new user of this forum. I usually work with Visual Studio 2008 in C# .NET. I have some experience in C# and can freely meet my needs. But now-a-days, I am wondering with the design of The KMPlayer, Windows Media Player, Nokia PC Suite, Real … | |
I was just a bit confused about something sorry. If you have two classes, Ribbon1 and ThisAddIN below. How can I call Example()? - All are in the same namespace.. [CODE] public partial class Ribbon1 { private void button1_Click_1(object sender, RibbonControlEventArgs e) { //Call Example() from ThisAddIn Class Example(); } … | |
Dear respected programmers. Please could you help me (again) on how to put the following code into functions for my program. I have read on-line and understand how functions work but when I do it myself it all goes pear shaped(I am such a noob). Please could you help with … | |
i use the window 7 with Turbo C(16-bit) compiler , now i have an assignment to generate the bicycle code in c++ graphics when i run any graphics program the TC show error and terminate . plzz help me as fast as possible. | |
Olaylar= record 1024Bytes = array[0..1023] of byte; OnRx: procedure(const RxBfr: 1024Bytes; const DataLen: word); stdcall; OnTx: procedure(const TxBfr: 1024Bytes; const DataLen: word); stdcall; end; | |
can anyone help me with the above problem? i need the code in C language. the problem is: Store random numbers into two-dimensional array of 6 * 6 and interchange first 3 rows with last three rows thanks you in advance. | |
I make a small project on student but i don't know about file handling for database; can any one tell me the simple way to connect my project to SQL database; | |
C# and VB.NET are very easy and very powerful languages to develop Windows applications. there are no fundamental advantages or disadvantages between then coz they both support every .net feature. But the point lies in the ease of use and the syntactical readability. I prefer C# more becoz it resembles … | |
I have been working on a program that requires me to use bubble,insertion, and selection sort. My program runs without any compiler errors. I have printed out the total number of comparisons but I am having trouble trying to print out the array values for bubble,insertion, and selection sort. I … | |
Hey guys using Linux(C) using POSIX API system calls read,write, open etc. I can open,read,write to a file and copy its contents to an output file. How would I go about copying more than one file to an output file using related system calls only. I currently have: [code=c]filein = … | |
Hi there I'm looking for a way to add filters in my windows form application. I have a menu strip with item called 'Filters'. Under that items there are items called 'Jobs Pending, Jobs Outstanding, Etc.....' Take for example 'Jobs Pending'. How do I filter from my database in sql … | |
hey this is a just for fun topic (a.k.a. NOT homework) but if you can please reply: I am working in Visual C++ and I can't get any <iostream> operation to write a single character to a variable and then check it in an if() statement. Here is my last … | |
I'm new to c#. [B]How do I add five numbers to each other and indentify the highest and lowest value together with the average value of this five numbers?[/B] Please give me something to begin with (or a whole example of code to study). Have a nice day. Thank you. | |
Dear Friend, I have one Window From it will open on clicking on ToolStrip button, UserControl1.cs contain ToolStrip (ToolStrip used as IE ToolBar). Form contain One TextBox and One close Button, I need to open a Form on every new IE window open and keep that Form on IE Only … | |
I'm very interested in learning C before C++ but I can't find good books The K&R book looked very organized and short but it seems it is very outdated. So my two questions are.. Should I read the K&R book even thought it uses an old standard, if I do … | |
Hi everyone...I am at University and learning C# for my software development modules. Presently I am mostly using "Beginning Microsoft Visual C# 2008" (although I find C# for dummies pretty good!). Its always the case that some books suit people better than others and they find them easier to understand. … | |
I need to code a C++ program to execute the tab control of the keyboard through the code. I am expecting when the tab control of the code gets executed, we should be able to navigate throught the web page through it. for example, take a web page, and we … | |
:-/ c++ program having included all functions combined is needed. can somebody help..?? | |
when i execute the below progam i am getting this errror [ICODE]type or namespace definition, or end-of-file expected in c#[/ICODE] [CODE] using System; class Program { public static void Main(string [ ] args){ string[] colorList =new string[10]; colorList[0] = "sunday"; colorList[1] = "monday"; colorList[2] = "tuesday"; colorList[3] = "wednesday"; colorList[4] … | |
Hi everyone I want to open the Directory like this using C++ in linux eg : /proc/1/status where proc and 1 is a directory and status is a file,which i want to access(i.e)this file i have to copy to an string to access some information..................can anyone help | |
Olaylar= record 1024Bytes = array[0..1023] of byte; OnRx: procedure(const RxBfr: 1024Bytes; const DataLen: word); stdcall; OnTx: procedure(const TxBfr: 1024Bytes; const DataLen: word); stdcall; end; | |
Hello all, I have a windows application with a DataGridView. I have successfully bound the DataGridView to a datasource (datatable based on database query). I would like one of the columns to be a ComboBox that is selected to the correct datasource value, yet upon click displays data from a … | |
hi, php have thi svery nice function strtoime() int strtotime ( string $time [, int $now ] ) The function expects to be given a string containing an English date format and will try to parse that format into a Unix timestamp (the number of seconds since January 1 1970 … | |
ok, below is the code that i have tried and still not working; #include <stdio.h> int main () { char Name; int Age; int Date_Of_Birth; float Place_Of_Birth; float Email_Address; printf ("Name:"); scanf ("%c",&Name); printf ("Age:\n"); scanf ("%d",&Age); printf ("Date Of Birth:\n"); scanf ("%d",&Date_Of_Birth); printf ("Place Of Birth:\n"); scanf ("%s",&Place_Of_Birth); printf … | |
I've been writing a pig latin translation program for a week in class now and i've gotten so far but now i don't know what to do. i need to check if the word has a vowel as the first letter then only add ay in the end if it … | |
[B][U]Hi, this is kind of silly request, can anyone help me with these three C++ progs[/U]:[/B] [B]I - Predefined number of operation Calculator[/B]: [U]e.g[/U]. 5 + 12 - 3 10 / 3 - 5 /12 The program should ask for the following 1- number of operations 2- the equation for … | |
Hi! Im having a problem in the next line: i = socket.Receive(buffer) buffer is defined as: byte[] buffer = new byte[1024]; It crash when its waiting for the answer. In c++ im sending this: len = send(sock,"hola",4,0); Any idea? Thanks | |
Hi, I have a question regarding navigating to a listbox item in C#. I have written code which populates a listbox from an xml file in xaml (thus bound to it). However I want to navigate to the selected item in the listbox using code in c#. I can navigate … | |
I am having trouble with my print function for my linked queue. My compiler error is pointing towards cout << tempPtr->info << " "; line 149 tempPtr = tempPtr->next; line 150 in my print function. Can anyone help me fix this? Thanks CODE: [CODE] #include <iostream> #include <cstddef> // For … | |
How to write a program that asks the users to enter two integers, obtains the numbers from user, then prints the larger number followed by the words "is larger", if the numbers are equal, print the message "these are equal". use only the single-selection form of the if statement. | |
Hello. Im interested in learning something about allocating memory for a 2d array. So I have a function that does this, and it goes something like this : [CODE]short **g2D(short **arr,short row,short col) { short i; arr=malloc(row*sizeof*arr); if(!arr) { printf("\nMemory unavailable"); exit(EXIT_FAILURE); } for(i=MIN;i<row;i++) { arr[i]=malloc(col*sizeof*arr); if(!arr) { printf("\nMemory unavailable"); … | |
I was wondering if anyone could tell me why my code is not displaying anything. My connection is correct because I did copy it from a program that already works properly. *Beginner Student* [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] … | |
Hi, I have a doubt that why string is immutable in c#/java? why not that case with primitive types such as int,float etc..? can you please let me know what the reason behind this design? Thanks, Pradeep | |
Does anyone know how to add a new button to the 'New E-Mail' Window of Outlook 2010?! - Preferably on the 'Message' ribbon. I had a lok and it's pretty confusing with limited documentation. THanks! | |
This is for the numerous people I see constantly asking how to "pause" the console after their code runs. The explanation for how the code works is within the snippet in comments. Basically, the "cin.clear();" function will clear the input stream, getting rid of any newline characters that would have … |
The End.