| Reply | « Previous Thread | Next Thread » |
|
I have a lot of data in a MySQL database, I wish to import all this data into the native DBMS of Symbian (e32db). I couldn't find a direct solution for injecting these SQL statements right into the DB so I created a database dump of my MySQL data. Now I'm trying to load all these SQL statements from the dumpfile into e32db but the DBMS just won't import them.
I see that a statement like this is working: strn = u"INSERT INTO cells (country_id, network, cell, cell_range, postcode, plaats, land, latitude, longitude) VALUES (%d,%d,%d,%d,%d,'%s','%s',%f,%f)"%(204,815,7294606,0,6816,'Arnhem','Netherlands',52.0,5.8) self.db.execute(strn) But in my textfile the data is stored as a complete query (no %d notations and stuff). This doesn't work for instance: self.db.execute("INSERT INTO cells (country_id, network, cell, cell_range, postcode, plaats, land, latitude, longitude) VALUES ('204','815', '7294606', '0', '6816', 'Arnhem', 'Netherlands', '52.0',5.8)") Is there another way I can solve this problem? I guess I'm getting a bit lazy since i'm already working on this for two days or so. Is there maybe a direct way to import these queries into e32db? Thanks in advance. |
| 1christian85 |
| View Public Profile |
| Find all posts by 1christian85 |
|
Sorry, there's no support for directly importing data in any other syntax into e32db. You'll have to parse that data dump and reformat it into the proper form with the quotes removed.
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |