Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: .NET3.5 C# Open-Office
HI,
 
Currently I have open office database. Now I need to get that database data to c# windows form application. I want to connect the open office database with connection string and get the dataset from c#. Can any one help me.
Thank you,
Posted 6-Jun-12 17:14pm
Soft0091.8K
Comments
Bernhard Hiller at 8-Jun-12 4:06am
   
It's an interesting question. I followed Abhinav's link and did not find anything useful: there are many drivers for retrieving data from other database into OpenOffice database, but no hints at all for conencting from a .Net application.
Perhaps you could ask your question also in a OpenOffice developer forum, and StackOverflow - in case you get a useful answer there, please come back and tell us.
Soft009 at 8-Jun-12 4:29am
   
Thanks a lot, I'll submit this in the Open office developer forum. Definitely I'll come back. :)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

I just want to set the connection with the database in c#
Yes it is possible, for that you have to follow some steps:
 
1) First add
"using System.Data.OleDb;"
at to top of the CS file.
 
2) Create connection string and open connection.
For access 2007
string ConnStr = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\abc.mdb;Jet OLEDB:Database Password=password";
 
OleDbConnection MyConn = new OleDbConnection(ConnStr);

3) Open this connection.
MyConn.Open();
 
4) Create object for command and reader to get the data from access database.
 OleDbCommand Cmd =  new OleDbCommand(StrCmd, MyConn);;
  OleDbDataReader ObjReader = Cmd.ExecuteReader();
 
5) Now lood through the reader object to get the data
 
if (ObjReader != null)
{
 
}
 
6) After completing the processing
ObjReader.Close();
MyConn.Close();
  Permalink  
Comments
Soft009 at 7-Jun-12 0:28am
   
Thanks for the answer, I know the connection for the access database. I want it for "Open Office base" for "newdatabase.odb"
seyohan at 30-Mar-13 9:50am
   
do you find a solution?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

http://wiki.services.openoffice.org/wiki/Database[^] should provide you with some solutions.
  Permalink  
Comments
Soft009 at 6-Jun-12 23:36pm
   
Thank you,
I just want to set the connection with the database in c#. Is it possible.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

https://wiki.openoffice.org/wiki/Database/Drivers/MySQL_Native/1.0[^]
 
This has your and mine aswers
Smile | :)
Peace Out Buddy
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 310
1 Sergey Alexandrovich Kryukov 202
2 Richard MacCutchan 160
3 PhilLenoir 154
4 Sharmanuj 146
0 Sergey Alexandrovich Kryukov 5,999
1 OriginalGriff 5,115
2 CPallini 2,473
3 Richard MacCutchan 1,597
4 Abhinav S 1,505


Advertise | Privacy | Mobile
Web02 | 2.8.140814.1 | Last Updated 31 Jan 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100