الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

دروس في برمجة قواعد البيانات بالفيجوال سي ++

بدأه البارودي في 27 مايو 2005 · 30 رد · 9,936 مشاهدة · في المواضيع و الدروس القيّمة
مشاركة: واتساب X فيسبوك تيليجرام
#26

اعتقد ان تصميم برامج للتعامل مع قواعد البيانات كحلول من خلال ++Visual C أمر متعب للغاية ...

#28

صحيح لكننا سنفقد مميزات كثيره تعطيها التقنيات المختلفه

ado,sql statment,sql server

تعرف انا بفكر فى انشاء مكتبه للتعامل وانشاء قواعد البيانات

بالسى

ونستطيع التعامل معها من vb6

فكم من اخطاء تحدث عند نقل قواعد البيانات هذا غير ضخامه البرنامج

عند اضافه مشغل القواعد ليصحب النسخه

لكننا سنحتاج لا اعرف ان كان يتواجد لدينا جميعا ام لا

وهذا المشروع تبناه من قبل تركى العسيرى معلمنا المشهور فى البيسك

وهو الان انتقل الى السى لا اعرف ماذا تم فيه بعد توقف فجوال بيسك العرب

فيمكن لاعضاء منتدى السى فى الفريق العربىان يتبنوا المشروع

ايضا

تصميم كافة انواع المواقع البرامج بافضل الاسعار

aaasamy7@hotmail.com

الاسكندريه -مصر

ت:5749981

#29

هذه المشاريع الجماعيه تحتاج الى:

وقت -تنظيم - اداره- هدف

فلندعها جانبا ونواصل مشروعنا الاصغر والذى تبناه اخونا البارودى

وفقه الله

تصميم كافة انواع المواقع البرامج بافضل الاسعار

aaasamy7@hotmail.com

الاسكندريه -مصر

ت:5749981

#30

السلام عليكم

حاولت تشغيل الكود المذكور بواسطة vs 2005 لكنه يظهر رسالة الخطأ

fatal error C1083: Cannot open include file: 'fstream.h': No such file or directory

460.gif

#31

نفس الكود الذي في المشاركة فقط تعديل بسيط.

LEFT TO RIGHT

#include<iostream>

#include<conio.h>

#include<windows.h>

#include<fstream>

#include<process.h>

using namespace std;

int i;

//*******************************************************************

void gotoxy(int x, int y)

{

COORD coord;

coord.X = SHORT(x);

coord.Y = SHORT(y);

SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);

}

//******************************************************************

void clrscr()

{

COORD coordScreen = { 0, 0 };

DWORD cCharsWritten;

CONSOLE_SCREEN_BUFFER_INFO csbi;

DWORD dwConSize;

HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);

GetConsoleScreenBufferInfo(hConsole, &csbi);

dwConSize = csbi.dwSize.X * csbi.dwSize.Y;

FillConsoleOutputCharacter(hConsole, TEXT(' '), dwConSize, coordScreen, &cCharsWritten);

GetConsoleScreenBufferInfo(hConsole, &csbi);

FillConsoleOutputAttribute(hConsole, csbi.wAttributes, dwConSize, coordScreen, &cCharsWritten);

SetConsoleCursorPosition(hConsole, coordScreen);

}

//**********************************************************************

void textbackcolor(int color)

{

SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),WORD( color) <<4);

}

//**********************************************************************

void textcolor(int color)

{

SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),WORD( color));

}

//**************************************************

void loading(int x1,int y1,int x2,int y2)

{

int i;

gotoxy(x1,y1);

putch(177);

for(i=x1+1;i<x2;i++)

putch(177);

putch(177);

for(i=y1+1;i<y2;i++)

{gotoxy(x1,i);

putch(177);

gotoxy(x2,i);

putch(177);

}

gotoxy(x1,y2);

putch(177);

for(i=x1+1;i<x2;i++)

putch(177);

putch(177);

}

//********************************************************************

void load()

{

int w=1,q=80,r=24;

clrscr();

textbackcolor(10);

for(int i=1;i<10;i++)

{

loading(w,i,q,r);

w++;

q--;

r--;

}

cout<<"\n\t\t\n";

textbackcolor(10);

gotoxy(12,11);

cout<<"\t\t\t\20\20\20 Loading completed \20\20\20 \n";

cout<<"\t\t\t press enter to continue.\n";

gotoxy(12,13);

textbackcolor(1);

for(int m=0;m<57000000;m++)

{if(m%1000000==0){cputs(" ");}}

textbackcolor(10);

clrscr();

cout<<"\n\t\t\t";

cout<<endl;

getche();

cout<<"\a\a\a\a\a\a\a\a\a\a\a";

}

//********************************************************************

void display()

{

textbackcolor(19);

clrscr();

cout<<"\n\n\n\n\n";

cout<<"\t\t\t\t \n";

cout<<"\t\t\t\t \n";

cout<<"\t*******************************************************************\n";

cout<<"\t*******************************************************************\n";

cout<<"\t** \" WELCOME TO MY PROJECT \" **\n";

cout<<"\t** \" Student DataBase \" **\n";

cout<<"\t** * Press ENTER to Continue * **\n";

cout<<"\t*******************************************************************\n";

cout<<"\t*******************************************************************\n";

cout<<"\n\t\t\t\t\t\t";

gotoxy(15,15);

char sav[]= "\20\20\20******** LOADING ************************\20";

int i=0;

for(int m=0;m<35000000;m++){if(m%1000000==0){cout<<sav;i++;}}

cout<<endl;

}

//******************************************************************

void tabel()

{

loading(2,2,77,23);

}

//******************************************************************

struct student

{

int student_id[100];

char student_name[250][100];

char student_address[250][100];

int telephone[100];

char student_email[250][100];

};

//*****************************************************************

struct age

{

int date[100];

};

//*******************************************************************

struct object

{

int object_id[100];

char object_name[250][100];

int object_net[100];

};

//*******************************************************************

int main()

{

display();

clrscr();

textbackcolor(19);

clrscr();

load();

clrscr();

textcolor(23);

clrscr();

tabel();

gotoxy(20,6);

char wel[250]="\20\20\20 WELCOME TO THE STUDENT DataBase \21\21\21";

cout<<wel;

cout<<endl;

gotoxy(20,8);

char mad[250]="\20\20\20 MADE BY :>>>>>";

cout<<mad;

cout<<endl;

gotoxy(20,10);

char mos[250]="* MOSTAFA MAHMOUD SAMY EL BARODY *";

cout<<mos;

cout<<endl;

gotoxy(20,12);

char loc[250]="* THE LOCATION IS EGYPT-EL FAYOUM *";

cout<<loc;

cout<<endl;

gotoxy(20,14);

char em[250]="* EMAIL ADDRESS : MOSTAFAELBARODY@HOTMAIL.COM *";

cout<<em;

cout<<endl;

gotoxy(20,18);

char next[250]="* TO CONTINUE PRESS ENTER *";

cout<<next;

cout<<endl;

getche();

cout<<"\a";

select:

clrscr();

textcolor(23);

clrscr();

tabel();

gotoxy(20,6);

char welc[250]="\20\20\20 WELCOME TO THE STUDENT DataBase \21\21\21";

cout<<welc;

cout<<endl;

gotoxy(20,8);

char sel[250]="** TO DO WHAT YOU WANT SELECT :>>";

cout<<sel;

cout<<endl;

gotoxy(20,10);

char add[250]="* 1- ADD to add data.";

cout<<add;

cout<<endl;

gotoxy(20,12);

char ser[250]="* 2- SERCHE to serche about data.";

cout<<ser;

cout<<endl;

gotoxy(20,14);

char abo[250]="* 3- ABOUT to read about programe.";

cout<<abo;

cout<<endl;

gotoxy(20,16);

char ext[250]="* 4- EXIT to EXIT PROGRAME.";

cout<<ext;

cout<<endl;

gotoxy(20,19);

char ent[250]="* ENTER YOUR SELECT HERE : ";

cout<<ent;char ch;cin>>ch;

cout<<"\a";

if(ch!='1' && ch!='2' && ch!='3' && ch!='4')

{

textcolor(20);

clrscr();

loading(20,5,57,15);

gotoxy(22,7);

char err[250]="\a* ERROR *";

cout<<err;

cout<<endl;

gotoxy(22,9);

char error[250]="* YOU MUST SELECT FROM \'1\' TO \'4\' ";

cout<<error;

cout<<endl;

gotoxy(23,11);

char eror[250]="try again !!.";

cout<<eror;

cout<<endl;

getch();

goto select;

}

switch (ch)

{

case '1':

{

addtype:

clrscr();

textcolor(23);

clrscr();

tabel();

gotoxy(20,6);

char welc[250]="\20\20\20 WELCOME TO THE STUDENT DataBase \21\21\21";

cout<<welc;

cout<<endl;

gotoxy(20,8);

char sel[250]="** TO DO WHAT YOU WANT SELECT :>>";

cout<<sel;

cout<<endl;

gotoxy(20,10);

char add[250]="* 1- ADD to add student data.";

cout<<add;

cout<<endl;

gotoxy(20,12);

char ser[250]="* 2- ADD to add subject data.";

cout<<ser;

cout<<endl;

gotoxy(20,14);

char abo[250]="* 3- RETURN to return to main page.";

cout<<abo;

cout<<endl;

gotoxy(20,19);

char ent[250]="* ENTER YOUR SELECT HERE : ";

cout<<ent;char cm;cin>>cm;

cout<<"\a";

if(cm!='1' && cm!='2' && cm!='3' )

{

textcolor(20);

clrscr();

loading(20,5,57,15);

gotoxy(22,7);

char err[250]="\a* ERROR *";

cout<<err;

cout<<endl;

gotoxy(22,9);

char error[250]="* YOU MUST SELECT FROM \'1\' TO \'3\' ";

cout<<error;

cout<<endl;

gotoxy(23,11);

char eror[250]="try again !!.";

cout<<eror;

cout<<endl;

getch();

goto addtype;

}

switch (cm)

{

case '1':

{

goto addstudent;

break;

}

case '2':

{

goto addsubject;

break;

}

case '3':

{

goto select;

break;

}

}

//**

//*

addstudent:

char ck;

for(int i=1;i<=100;i++)

{

do

{

ofstream svfile("stordata.txt",ios::app);

ifstream rdfile("stordata.txt",ios::out );

student student;

age age;

clrscr();

textcolor(23);

clrscr();

tabel();

gotoxy(20,5);

char endata[250]="\20\20\20 WELCOME TO THE STUDENT DataBase \21\21\21";

cout<<endata;

cout<<endl;

gotoxy(20,7);

char q[250]="** TO ADD DATA FOLOW THIS STEPS :>>";

cout<<q;

cout<<endl;

gotoxy(15,9);

char stuid[250]="* 1- ENTER STUDENT ID :";

cout<<stuid;

cin>>student.student_id;

svfile<<"\n"<<student.student_id;

cout<<endl;

gotoxy(15,11);

char stuname[250]="* 2- ENTER THE STUDENT NAME :";

cout<<stuname;

cin>>student.student_name;

svfile<<"\t"<<student.student_name;

cout<<endl;

gotoxy(15,13);

char stuaddress[250]="* 3- ENTER THE STUDENT ADDRESS :";

cout<<stuaddress;

cin>>student.student_address;

svfile<<"\t\t"<<student.student_address;

cout<<endl;

gotoxy(15,15);

char stuage[250]="* 4- ENTER THE STUDENT AGE:";

cout<<stuage;

cin>>age.date[100];

svfile<<"\t\t"<<age.date[100];

cout<<endl;

gotoxy(15,17);

char stutele[250]="* 5- ENTER THE STUDENT TELEPHONE :";

cout<<stutele;

cin>>student.telephone;

svfile<<"\t"<<student.telephone;

cout<<endl;

gotoxy(15,19);

char stue[250]="* 6- ENTER THE STUDENT EMAIL :";

cout<<stue;

cin>>student.student_email;

svfile<<"\t"<<student.student_email;

cout<<endl;

svfile.close();

gotoxy(20,21);

char ask[250]="** WOULD YOU LIKE TO ADD DATA AGAIN ?(Y/N):";

cout<<ask;

cin>>ck;

if(ck!='y' && ck!='n')

{

textcolor(20);

clrscr();

loading(20,5,57,15);

gotoxy(22,7);

char error[250]="\a* ERROR *";

cout<<error;

cout<<endl;

gotoxy(22,9);

char errore[250]="* YOU MUST ENTER \'Y\' OR \'N\' ";

cout<<errore;

cout<<endl;

gotoxy(23,11);

char erore[250]="try again !!.";

cout<<erore;

cout<<endl;

getch();

goto addstudent;

}

cout<<"\n";

cout<<endl;

}

while(ck=='y');

if(ck=='n')

{

goto select;

}

break;

}

//***

}

case '2':

{

//***************

goto search;

search:

ofstream svfile("stordata.txt",ios::app);

ifstream rdfile("stordata.txt",ios::out );

student a;

object b;

age c;

int m;

char id[100],name[100];

char chk;

do

{

clrscr();

textcolor(23);

clrscr();

tabel();

gotoxy(20,5);

char welcome[250]="\20\20\20 WELCOME TO THE STUDENT DataBase \21\21\21";

cout<<welcome;

cout<<endl;

gotoxy(20,7);

char z[250]="** TO SERCH ABOUT DATA FOLOW THIS STEPS :>>";

cout<<z;

cout<<endl;

gotoxy(15,9);

char y[250]="* 1- ENTER THE ID :";

cout<<y;

cin>>id[m];

clrscr();

textcolor(23);

clrscr();

tabel();

char welcomee[250]="\20\20\20 WELCOME TO THE STUDENT DataBase \21\21\21";

cout<<welcomee;

cout<<endl;

gotoxy(15,7);

char f[250]="* 1- THE STUDENT ID :";

cout<<f;

rdfile>>id[m];

cout<<id[m];

cout<<endl;

gotoxy(15,9);

char g[250]="* 2- ENTER THE STUDENT NAME :";

cout<<g;

cout<<endl;

gotoxy(15,11);

char h[250]="* 3- ENTER THE STUDENT ADDRESS :";

cout<<h;

cout<<endl;

gotoxy(15,13);

char i[250]="* 4- ENTER THE STUDENT AGE:";

cout<<i;

cout<<endl;

gotoxy(15,15);

char j[250]="* 5- ENTER THE STUDENT TELEPHONE :";

cout<<j;

cout<<endl;

gotoxy(15,17);

char k[250]="* 6- ENTER THE STUDENT EMAIL :";

cout<<k;

cout<<endl;

gotoxy(20,21);

char ak[250]="** WOULD YOU LIKE TO ADD DATA AGAIN ?(Y/N):";

cout<<ak;

cin>>chk;

if(chk!='y' && chk!='n')

{

textcolor(20);

clrscr();

loading(20,5,57,15);

gotoxy(22,7);

char error[250]="\a* ERROR *";

cout<<error;

cout<<endl;

gotoxy(22,9);

char errore[250]="* YOU MUST ENTER \'Y\' OR \'N\' ";

cout<<errore;

cout<<endl;

gotoxy(23,11);

char erore[250]="try again !!.";

cout<<erore;

cout<<endl;

getch();

goto search;

}

cout<<"\n";

cout<<endl;

}

while(chk=='y');

if(chk=='n')

{

goto select;

}

break;

}

//************

case '3':

{

clrscr();

textcolor(23);

clrscr();

tabel();

gotoxy(20,6);

char wel[250]="\20\20\20 WELCOME TO THE STUDENT DataBase \21\21\21";

cout<<wel;

cout<<endl;

gotoxy(20,8);

char mad[250]="\20\20\20 MADE BY :>>>>>";

cout<<mad;

cout<<endl;

gotoxy(20,10);

char mos[250]="* MOSTAFA MAHMOUD SAMY EL BARODY *";

cout<<mos;

cout<<endl;

gotoxy(20,12);

char loc[250]="* THE LOCATION IS EGYPT-EL FAYOUM *";

cout<<loc;

cout<<endl;

gotoxy(20,14);

char em[250]="* EMAIL ADDRESS : MOSTAFAELBARODY@HOTMAIL.COM *";

cout<<em;

cout<<endl;

gotoxy(20,18);

char next[250]="* TO CONTINUE PRESS ENTER *";

cout<<next;

cout<<endl;

getche();

cout<<"\a";

goto select;

break;

}

case '4':

{

clrscr();

loading(20,5,59,15);

gotoxy(22,9);

char tha[250]=" ** THANKS FOR USE THIS PROGRAME **";

cout<<tha;

cout<<endl;

gotoxy(32,11);

char bye[250]="\20\20 GOOD BYE \21\21";

cout<<bye;

cout<<"\n\n\n\n\n";

cout<<endl;

getch();

exit(0);

cout<<"\n\n\n\n\n";

break;

}

//**

addsubject:

char mk;

for(int m=1;m<=100;m++)

{

do

{

ofstream svfile("subject.txt",ios::app);

ifstream rdfile("subject.txt",ios::out );

object subject;

clrscr();

textcolor(23);

clrscr();

tabel();

gotoxy(20,5);

char endata[250]="\20\20\20 WELCOME TO THE STUDENT DataBase \21\21\21";

cout<<endata;

cout<<endl;

gotoxy(20,7);

char q[250]="** TO ADD DATA FOLOW THIS STEPS :>>";

cout<<q;

cout<<endl;

gotoxy(15,9);

char subid[250]="* 1- ENTER SUBJECT ID :";

cout<<subid;

cin>>subject.object_id[m];

svfile<<"\n"<<subject.object_id[m];

cout<<endl;

gotoxy(15,11);

char subname[250]="* 2- ENTER THE SUBJECT NAME :";

cout<<subname;

cin>>subject.object_name[m];

svfile<<"\t"<<subject.object_name[m];

cout<<endl;

gotoxy(15,13);

char subnet[250]="* 3- ENTER THE NET OF SUBJECT :";

cout<<subnet;

cin>>subject.object_net[m];

svfile<<"\t\t"<<subject.object_net[m];

cout<<endl;

svfile.close();

gotoxy(20,21);

char ask[250]="** WOULD YOU LIKE TO ADD DATA AGAIN ?(Y/N):";

cout<<ask;

cin>>mk;

if(mk!='y' && mk!='n')

{

textcolor(20);

clrscr();

loading(20,5,57,15);

gotoxy(22,7);

char error[250]="\a* ERROR *";

cout<<error;

cout<<endl;

gotoxy(22,9);

char errore[250]="* YOU MUST ENTER \'Y\' OR \'N\' ";

cout<<errore;

cout<<endl;

gotoxy(23,11);

char erore[250]="try again !!.";

cout<<erore;

cout<<endl;

getch();

goto addsubject;

}

cout<<"\n";

cout<<endl;

}

while(mk=='y');

if(mk=='n')

{

goto select;

}

break;

}

}

return 0;

}

tvquran_6.gif

مواضيع مشابهة

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…