Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


Closed Thread
  Search this Thread
Old 06-02-2009, 02:07 AM   #1
Registered: Apr 2009
Posts: 48

Rep: Reputation: 15
insert openoffice data into mysql

Hai all,

This is sri

i am trying to insert openoffice doc data in to mysql table from openOffice. for that i done

installed openOffice base on fedora

and opened my document in openOffice

in tools ->macros -> organise macros -> Basic and for my document i created new macro 'mymac' and saved

mymac code
(first i am testing to insert any text in mysql)
(i want to take mysql connection and select db)
Sub Main
oDBCntxt = CreateUnoService("")
oDBSrc = oDBCntxt.getByName( "newdb" ) //newdb is my database in mysql
oConnection = oDBSrc.getConnection("root","srinath")
oStatement = oConnection.CreateStatement

sSQL = "insert into tblTest ( Id, data ) values( null, 'ddd' );"
oStatement.execute( sSQL)

End Sub

now when i run that macro at tools ->macros -> run macros
i am getting error dialog like

An exception occurred
Message: newdb

i don't know statements for reading my doc file here tell me how that also

please tell me how to solve this.

Old 06-02-2009, 02:26 AM   #2
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread has been reported for closure because it is a duplicate.

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
openOffice data into mysql sriphp Linux - Newbie 1 06-02-2009 04:42 PM
php/mysql data INSERT IGNORE problem frieza Programming 2 09-03-2008 03:42 PM
insert textbox in openoffice Four Linux - Newbie 4 03-23-2006 10:07 PM
segmentation fault when insert data into mysql torontosmallbird Other *NIX 1 08-07-2005 07:13 AM
Insert Data by FORM in MYSQL gruger Linux - Software 0 07-16-2003 12:50 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:09 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration