How I can converte a sql database into dbf ?
Falconi Silvio
How I can converte a sql database into dbf ?
Silvio.
1.-create connection with database (mysql/mssql/firebird/postgreesql)
2.-create a structucture of dbf based in the structure of table sql.
3.-read the table sql record by record and insert in table dbf the fields of the recordset.
NOTE: you can use ADO for the read the data in sql.
sorry for my bad english.
salu2
carlos vargas
sorry but I not Know the structure of sql file
I have only this file xxx.sql and I must converte it on dbf
-- Tiempo de generación: 09-11-2009 a las 15:54:43
-- Versión del servidor: 5.0.51
-- Versión de PHP: 4.4.4
--
-- Base de datos: `bdc`
--
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `categorias`
--
DROP TABLE IF EXISTS `categorias`;
CREATE TABLE IF NOT EXISTS `categorias` (
`id` int(11) NOT NULL auto_increment,
`idcategoria` varchar(10) NOT NULL default 'C0',
`nombrec` varchar(250) NOT NULL default '',
`orden` int(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ;
--
-- Volcar la base de datos para la tabla `categorias`
--
INSERT INTO `categorias` VALUES (1, 'C01', 'Cumpleaños', 2);
INSERT INTO `categorias` VALUES (2, 'C02', 'Aniversario', 1);
INSERT INTO `categorias` VALUES (3, 'C03', 'DÃa de la Madre', 11);
INSERT INTO `categorias` VALUES (4, 'C04', 'Felicitaciones', 3);
INSERT INTO `categorias` VALUES (5, 'C05', 'Corporativo', 4);
INSERT INTO `categorias` VALUES (6, 'C06', 'Mejorate Pronto', 5);
INSERT INTO `categorias` VALUES (7, 'C07', 'Buena Suerte', 6);
INSERT INTO `categorias` VALUES (8, 'C08', 'Nacimientos', 7);
INSERT INTO `categorias` VALUES (9, 'C09', 'Románticos', 8);
INSERT INTO `categorias` VALUES (10, 'C10', 'Muchas Gracias', 9);
INSERT INTO `categorias` VALUES (11, 'C11', 'Pensando en Ti', 10);
INSERT INTO `categorias` VALUES (12, 'C12', 'DÃa del Padre', 12);
INSERT INTO `categorias` VALUES (14, 'C14', 'Ocaciones Especiales', 14);
INSERT INTO `categorias` VALUES (13, 'C13', 'Niños', 13);
INSERT INTO `categorias` VALUES (15, 'C15', 'Centros para Piñatas', 15);Carlos:
I think Silvio is looking for a class/function like DIRECTORY() but for TABLES instead DBFs.
Silvio:
Search for ADOX in saint google.
Regards.
I CAN SEND YOU MY FILE IF YOU WANT TRY TO CONVERTE IT
i NOT kNOW THE STRUCTURE OF THIS FILE
A SCHOOL GIVE ME A FILE BIBLIO.SQL i MUST CONVERTE IT INTO DBF FILE BECUASE i ALLREADY MADE A BIBLIO APPLICATION ON 2001
IT I FOUND THE SOLUTION TO CONVERTE IT INTO DBF i CAN SAVE ALL RECORDS ON MY DBF FILE AND THIS SCHOOL CAN USE MY APPLICATION
Silvio, sendme your 'database.sql' backup, i will try it.
Silvio,
I can try, please end me the file sql. ![]()
karlos.vargas at gmail.com
salu2
carlos vargas
Try a software name SQL Converter
carlos I sent you the file at donbxxxx.... email
carlos vargas,
According to your information, if i want to online read sql data into my FWH program for further processing, Must I use Advantage Database Server, can I use advantage local server (because it is free) or any other method.
Right now I am using SQL CONVERTER to convert particular table into CSV file and then import to DBF for further processing, but it is batch conversion and not controlled by records
I hope i can retrieve by FWH program because it is more flexible.
Ready!
the procedure is easy.
1.-install mysql.
2.-SLQYog.
3.-Open SQLYog and open the mysql database.
4.-open you sql file, copy the content. an paste in the rigth windows in SQLYog.
5.-click rigth button mouse in the rigth windows in SQLYog and select run execute all query. (this procedure is similar to restore the dump file)
6.-install the odbc mysql 3.51 and create a connexion in the ODBC Origen Data in control panel. ( i call 'mytes' )
7.-open excel an select the data menu, and get external data option, then select new query database.
8.-select the mytest connexion and select the table biblio, follow the wizard.
9.-then the data is imported to sheet in excel.
10.-save the excel file as dbf file.
11.- you must modify the DBF file according to your needs.
i send the files dbf create in a zip to you email.
sorry for my very bad english.
salu2
carlos vargas
thanks carlos
-- Table structure for table `biblio`
--
CREATE TABLE IF NOT EXISTS `biblio` (
`NumIns` int(10) NOT NULL auto_increment,
`INVENTARIO` double(15,0) default NULL,
`NUM_ING` double(15,0) default NULL,
`DAT_ING` date default NULL,
`TITOLO` varchar(255) default NULL,
`TIPO` varchar(255) default NULL,
`VOLUME` double(15,0) default NULL,
`DIQUANTI` double(15,0) default NULL,
`AUTORI` varchar(255) default NULL,
`NUM_COPY` double(7,0) default NULL,
`SITUAZIONE` double(7,0) default NULL,
`CONSERVA` varchar(255) default NULL,
`SALA` varchar(255) default NULL,
`ARMADIO` varchar(255) default NULL,
`RIPIANO` varchar(255) default NULL,
`P_COPER` double(15,2) default NULL,
`VALORE` double(15,2) default NULL,
`FORNITORE` varchar(255) default NULL,
`EDITORE` varchar(255) default NULL,
`MESE` varchar(255) default NULL,
`ANNO` double(15,0) default NULL,
`PAGINE` double(15,0) default NULL,
`FORMATO` double(15,0) default NULL,
`ISBN` varchar(50) default NULL,
`DEWEY` varchar(255) default NULL,
`DEWDESC` varchar(255) default NULL,
`SOGGETTO` varchar(255) default NULL,
`ABSTRACT` varchar(255) default NULL,
PRIMARY KEY (`NumIns`),
UNIQUE KEY `INVENTARIO` (`INVENTARIO`),
UNIQUE KEY `NUM_ING` (`NUM_ING`),
KEY `NUM_COPY` (`NUM_COPY`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4246 ;Dear Mr.Stefan,
If I am not wrong, I understand that Mr.Silvio is having a .sql file, which actually is a sql dump file. (It has the table structure as well as the data in it). He needs to read the data from the .sql file and then transfer that data to a DBF file.
Mr.Silvio ?
Regards
Anser