Subversion Repositories OpenInventory

Compare Revisions

Ignore whitespace Rev 6 → Rev 17

/trunk/source_code/src/slots.cpp
605,7 → 605,7
//Ñîçäàåì òàáëèöó îòäåëîâ
 
 
q.prepare(tr("CREATE TABLE an_db.otdeli ( Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
q.prepare(tr("CREATE TABLE otdeli ( Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
"Íàçâàíèå CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íå çàäàíî\", "
"Ñïðàâêà CHAR(255) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íåò\", "
"PRIMARY KEY ( Èäåíòèôèêàòîð )) ENGINE = MyISAM CHARACTER SET cp1251 COLLATE cp1251_general_ci"));
617,7 → 617,7
 
q.clear();
q.prepare(tr("CREATE TABLE an_db.sotrydniki ( Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
q.prepare(tr("CREATE TABLE sotrydniki ( Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
"ÔÈÎ CHAR(80) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íå çàäàíî\", "
"Èäåíòèôèêàòîð_îòäåëà INTEGER UNSIGNED, "
"PRIMARY KEY ( Èäåíòèôèêàòîð )) ENGINE = MyISAM CHARACTER SET cp1251 COLLATE cp1251_general_ci"));
628,7 → 628,7
 
//Ñîçäàåì òàáëèöó ñèñòåìíûõ áëîêîâ
 
q.prepare(tr("CREATE TABLE an_db.system_blocks ( Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
q.prepare(tr("CREATE TABLE system_blocks ( Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
"Ñåðèéíûé_íîìåð CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íåèçâåñòåí\", "
"Èíâåíòàðíûé_íîìåð CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íå çàäàí\", "
"Äàòà_ïîêóïêè DATE, "
642,7 → 642,7
 
//Ñîçäàåì òàáëèöó ìàòåðèíñêèõ ïëàò
 
q.prepare(tr("CREATE TABLE an_db.matheboards ( Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
q.prepare(tr("CREATE TABLE matheboards ( Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
"Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íåèçâåñòåí\", "
"Ìîäåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íå èçâåñòíà\", "
"Ñëîò CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íåèçâåñòíî\", "
658,7 → 658,7
 
//Ñîçäàåì òàáëèöó ìîäóëåé ïàìÿòè
 
ok = q.prepare(tr("CREATE TABLE an_db.memory ( Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
ok = q.prepare(tr("CREATE TABLE memory ( Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
"Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íåèçâåñòåí\", "
"Ìîäåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íå èçâåñòíà\", "
"Òèï ENUM(\"DIM\",\"DDR\",\"DDRII\",\"RIMM\",\"SIMM\") DEFAULT \"DDRII\", "
673,7 → 673,7
 
q.clear();
 
ok = q.prepare(tr("CREATE TABLE an_db.proizvoditeli_pamyati (Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci NOT NULL, "
ok = q.prepare(tr("CREATE TABLE proizvoditeli_pamyati (Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci NOT NULL, "
"PRIMARY KEY ( Ïðîèçâîäèòåëü )) ENGINE = MyISAM CHARACTER SET cp1251 COLLATE cp1251_general_ci"));
 
ok = q.exec();
680,7 → 680,7
 
q.clear();
 
ok = q.prepare(tr("CREATE TABLE an_db.processors (Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
ok = q.prepare(tr("CREATE TABLE processors (Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
"Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íåèçâåñòåí\", "
"Ìîäåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íå èçâåñòíà\", "
"×àñòîòà INTEGER UNSIGNED, "
694,7 → 694,7
 
q.clear();
 
ok = q.prepare(tr("CREATE TABLE an_db.processor_models (Ìîäåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íå èçâåñòíà\", "
ok = q.prepare(tr("CREATE TABLE processor_models (Ìîäåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íå èçâåñòíà\", "
"Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íå èçâåñòåí\""
") ENGINE = MyISAM CHARACTER SET cp1251 COLLATE cp1251_general_ci"));
 
705,7 → 705,7
 
 
 
ok = q.prepare(tr("CREATE TABLE an_db.harddiscs (Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
ok = q.prepare(tr("CREATE TABLE harddiscs (Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
"Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íåèçâåñòåí\", "
"Èíòåðôåéñ CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íåèçâåñòåí\", "
"Îáúåì INTEGER UNSIGNED, "
720,7 → 720,7
q.clear();
 
 
ok = q.prepare(tr("CREATE TABLE an_db.proizvoditeli_hdd (Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci NOT NULL, "
ok = q.prepare(tr("CREATE TABLE proizvoditeli_hdd (Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci NOT NULL, "
"PRIMARY KEY ( Ïðîèçâîäèòåëü )) ENGINE = MyISAM CHARACTER SET cp1251 COLLATE cp1251_general_ci"));
 
ok = q.exec();
728,7 → 728,7
q.clear();
 
 
ok = q.prepare(tr("CREATE TABLE an_db.proizvoditeli_mb (Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci NOT NULL, "
ok = q.prepare(tr("CREATE TABLE proizvoditeli_mb (Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci NOT NULL, "
"PRIMARY KEY ( Ïðîèçâîäèòåëü )) ENGINE = MyISAM CHARACTER SET cp1251 COLLATE cp1251_general_ci"));
 
ok = q.exec();
738,7 → 738,7
 
 
 
ok = q.prepare(tr("CREATE TABLE an_db.proizvoditeli_cpu (Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci NOT NULL, "
ok = q.prepare(tr("CREATE TABLE proizvoditeli_cpu (Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci NOT NULL, "
"PRIMARY KEY ( Ïðîèçâîäèòåëü )) ENGINE = MyISAM CHARACTER SET cp1251 COLLATE cp1251_general_ci"));
 
ok = q.exec();
749,7 → 749,7
 
 
 
ok = q.prepare(tr("CREATE TABLE an_db.proizvoditeli_mb (Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci NOT NULL, "
ok = q.prepare(tr("CREATE TABLE proizvoditeli_mb (Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci NOT NULL, "
"PRIMARY KEY ( Ïðîèçâîäèòåëü )) ENGINE = MyISAM CHARACTER SET cp1251 COLLATE cp1251_general_ci"));
 
ok = q.exec();
760,7 → 760,7
 
 
 
ok = q.prepare(tr("CREATE TABLE an_db.proizvoditeli_video (Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci NOT NULL, "
ok = q.prepare(tr("CREATE TABLE proizvoditeli_video (Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci NOT NULL, "
"PRIMARY KEY ( Ïðîèçâîäèòåëü )) ENGINE = MyISAM CHARACTER SET cp1251 COLLATE cp1251_general_ci"));
 
ok = q.exec();
769,7 → 769,7
 
 
 
ok = q.prepare(tr("CREATE TABLE an_db.video_models (Ìîäåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íå èçâåñòíà\", "
ok = q.prepare(tr("CREATE TABLE video_models (Ìîäåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íå èçâåñòíà\", "
"Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íå èçâåñòåí\""
") ENGINE = MyISAM CHARACTER SET cp1251 COLLATE cp1251_general_ci"));
 
781,7 → 781,7
 
 
 
ok = q.prepare(tr("CREATE TABLE an_db.cd_dvd (Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
ok = q.prepare(tr("CREATE TABLE cd_dvd (Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
"Òèï CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íåèçâåñòåí\", "
"Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íåèçâåñòåí\", "
"Ñêîðîñòü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íåèçâåñòåíà\", "
795,7 → 795,7
q.clear();
 
 
ok = q.prepare(tr("CREATE TABLE an_db.videocards (Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
ok = q.prepare(tr("CREATE TABLE videocards (Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
"Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íåèçâåñòåí\", "
"Ìîäåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íåèçâåñòåíà\", "
"Èíòåðôåéñ CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íåèçâåñòåí\", "
809,7 → 809,7
 
q.clear();
 
ok = q.prepare(tr("CREATE TABLE an_db.soundcards (Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
ok = q.prepare(tr("CREATE TABLE soundcards (Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
"Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íåèçâåñòåí\", "
"Ìîäåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íåèçâåñòåíà\", "
"Èäåíòèôèêàòîð_ñèñòåìíîãî_áëîêà INTEGER UNSIGNED DEFAULT 1, "
821,7 → 821,7
 
q.clear();
 
ok = q.prepare(tr("CREATE TABLE an_db.lancards (Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
ok = q.prepare(tr("CREATE TABLE lancards (Èäåíòèôèêàòîð INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, "
"Ïðîèçâîäèòåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íåèçâåñòåí\", "
"Ìîäåëü CHAR(30) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT \"íåèçâåñòåíà\", "
"Ñêîðîñòü_ïåðåäà÷è_äàííûõ INTEGER UNSIGNED DEFAULT 100, "
834,7 → 834,7
 
q.clear();
 
ok = q.prepare(tr("INSERT INTO an_db.otdeli VALUES( default, \"Ñêëàä\", \"Ñêëàä\")"));
ok = q.prepare(tr("INSERT INTO otdeli VALUES( default, \"Ñêëàä\", \"Ñêëàä\")"));
 
ok = q.exec();