| View previous topic :: View next topic |
| Author |
Message |
Machine Head General User

Joined: 07 Nov 2006 Posts: 6
|
Posted: Wed Oct 10, 2007 11:11 pm Post subject: Does Rowset work with a MySQL database? |
|
|
Hello,
I try to transfer my base databases to MySQL but I have some problems with my macros which worked before...
After having define my connexion with good parameters in the macro maConnexion, I can make some queries using SQL and I have access to the datas.
| Code: | instrSQL = "SELECT * From arrachage"
maRequete = maConnexion.createStatement()
resuQuery = maRequete.executeQuery(instrSQL) |
But when I want to use the rowset utility, I can't access to the same database, I have an error saying "the database arrachage doesn't exist"
| Code: | unRowSet = createUnoService ("com.sun.star.sdb.Rowset")
With unRowSet
.activeConnection = maConnexion
.CommandType = com.sun.star.sdb.CommandType.TABLE
.Command = "arrachage"
.execute
End With |
I use the JDBC driver to connect and the version of mysql is 4.1.1.15
Maybe that the rowset doesn't work with MySQL databases. What do you think about that problem? |
|
| Back to top |
|
 |
mobi-doc OOo Enthusiast


Joined: 30 Jan 2007 Posts: 130 Location: Thessaloniki
|
Posted: Wed Oct 10, 2007 11:44 pm Post subject: |
|
|
| I've worked before with rowsets and Mysql, but with ODBC driver, and had no problem. |
|
| Back to top |
|
 |
Machine Head General User

Joined: 07 Nov 2006 Posts: 6
|
Posted: Thu Oct 11, 2007 12:10 am Post subject: |
|
|
I've found one solution: I modify these expressions | Code: |
.CommandType = com.sun.star.sdb.CommandType.TABLE
.Command = "arrachage"
|
By this one
| Code: |
.CommandType = com.sun.star.sdb.CommandType.COMMAND
.Command = "SELECT * FROM arrachage"
|
And it's work!!!! |
|
| Back to top |
|
 |
|