8,298 Topics

Member Avatar for
Member Avatar for zahrahLand

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 …

Member Avatar for Mitja Bonca
0
184
Member Avatar for judithSampathwa

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 …

Member Avatar for Mitja Bonca
0
175
Member Avatar for Shayaan_Mustafa

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 …

Member Avatar for Jason Giggs
0
865
Member Avatar for zobobthegreat

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 …

Member Avatar for kvprajapati
0
3K
Member Avatar for Don_k

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 …

Member Avatar for Don_k
0
209
Member Avatar for ssudra

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; …

Member Avatar for kvprajapati
0
2K
Member Avatar for astala27

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 ( , …

Member Avatar for arkoenig
0
2K
Member Avatar for PsychoCoder
Member Avatar for Joey_Brown

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. …

Member Avatar for Joey_Brown
0
92
Member Avatar for Hey90

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 …

Member Avatar for Adak
0
803
Member Avatar for nhjewel

[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 …

0
42
Member Avatar for xbox221

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 …

Member Avatar for xbox221
0
970
Member Avatar for anbuselvanmca

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?

Member Avatar for jbrock31
0
175
Member Avatar for MasterGberry

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 …

Member Avatar for MasterGberry
0
260
Member Avatar for RichMayor

Just register on this discussion community can i get someone to coach me personally?

Member Avatar for ddanbe
0
110
Member Avatar for Raihanorium

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 …

Member Avatar for Momerath
0
213
Member Avatar for stevetaylor15

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(); } …

Member Avatar for williamrojas78
0
205
Member Avatar for Don_k

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 …

Member Avatar for nezachem
0
149
Member Avatar for pawan_sharma777

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.

Member Avatar for Ancient Dragon
0
119
Member Avatar for Finarfin34

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;

Member Avatar for Wolfgan
0
124
Member Avatar for bill13

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.

Member Avatar for Mohtadeen
0
281
Member Avatar for pawan_sharma777

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;

Member Avatar for pawan_sharma777
0
457
Member Avatar for stevanity

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 …

Member Avatar for UsSy
-1
214
Member Avatar for sharifyboy7

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 …

Member Avatar for Fbody
0
252
Member Avatar for Don_k

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 = …

Member Avatar for Don_k
0
224
Member Avatar for TheDocterd

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 …

Member Avatar for TheDocterd
0
180
Member Avatar for ben25x

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 …

Member Avatar for Nick Evan
0
209
Member Avatar for Peter1

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.

Member Avatar for iconoclazt
0
197
Member Avatar for chiragwebmyne

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 …

Member Avatar for rameez420
0
145
Member Avatar for terabyte

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 …

Member Avatar for Trentacle
0
181
Member Avatar for james6754

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. …

Member Avatar for vedro-compota
2
164
Member Avatar for localp

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 …

Member Avatar for localp
0
326
Member Avatar for kuksa1994
Member Avatar for seanbp
0
50
Member Avatar for cthoes

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] …

Member Avatar for james6754
0
3K
Member Avatar for sdinu96

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

Member Avatar for Ancient Dragon
0
67
Member Avatar for Finarfin34

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;

Member Avatar for Sergey.Smirnov
0
182
Member Avatar for SusanHAllen

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 …

Member Avatar for SusanHAllen
0
1K
Member Avatar for snehil_khanor

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 …

Member Avatar for Sergey.Smirnov
0
773
Member Avatar for aria12

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 …

Member Avatar for gerard4143
0
116
Member Avatar for rhn94

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 …

Member Avatar for rhn94
0
739
Member Avatar for NMAZ

[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 …

Member Avatar for NMAZ
0
234
Member Avatar for krosty4782

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

Member Avatar for krosty4782
0
177
Member Avatar for ibdatx

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 …

Member Avatar for ibdatx
0
283
Member Avatar for sharifyboy7

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 …

Member Avatar for jonsca
0
320
Member Avatar for aria12

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.

Member Avatar for aria12
0
175
Member Avatar for Joey_Brown

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"); …

Member Avatar for Trentacle
0
151
Member Avatar for moone009

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[] …

Member Avatar for Mitja Bonca
0
111
Member Avatar for pradeepsimhanp

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

Member Avatar for kvprajapati
0
203
Member Avatar for stevetaylor15

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!

Member Avatar for Tekmaven
0
92
Member Avatar for packetpirate

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 …

Member Avatar for MosaicFuneral
-1
2K

The End.