Sorry, I forgot to attach the errors from installing the octave database
package on mac os x/3.4.2 macports.
Paul

Paul Dreik skrev 2011-12-22 21.53:
> No, I mean the sqlite c interface described in
> http://sqlite.org/c3ref/intro.html
> 
> Using odbc seems to be yet another method to connect. It seems like
> there is an odbc driver for sqlite.
> http://www.sqlite.org/cvstrac/wiki?p=SqliteOdbc
> I know the matlab database toolbox can connect through odbc, that is how
> I used it a few years ago.
> 
> 
> I assembled the list below with my comments and links to documentation.
> 
> I think the matlab database toolbox is a bit messy. It is also quite
> big, so users expecting to use octave database as a dropin replacement
> will probably never be satisfied unless they only use a very basic
> subset. It handles multiple databases, which is good.
> The documentation is at
> http://www.mathworks.se/help/toolbox/database/ug/f4-6010.html
> 
> I like the relatively clean interface of the sqlite c interface. This is
> how I built my toolbox. (It was a while ago, so I do not remember how
> closely I followed the c interface). Obviously this only supports
> sqlite, so It may be a poor choise for octave database toolbox unless it
> is an octave sqlite toolbox.
> Documentation for api introduction is at http://sqlite.org/cintro.html
> 
> I also like the perl dbi interface. It handles multiple databases, so it
> may be a good example on how to make an octave interface.
> An easy to read introduction exists at
> http://www.perl.com/pub/1999/10/DBI.html
> 
> I have never worked directly to odbc. Looking at the introductory
> material on
> http://msdn.microsoft.com/en-us/library/windows/desktop/ms714078%28v=vs.85%29.aspx
> I say lets stick to any other method...
> The good thing is that it handles multiple databases and it is cross
> platform.
> 
> The existing octave database package seems to offer both a generic
> interface and wrap the database specific apis. I do not know how well it
> performs. Installation failed for me two years ago or so, and it still
> fails now (octave 3.4.2 from macports. See attached errors). I assume I
> do not have all dependencies installed, but the errors seem to point to
> other problems. Have not looked deeper into it.
> I do not know if there are any plans for it or what the current status
> is. Last update on http://octave-swig.sourceforge.net/octave-db.html
> (linked to from http://octave.sourceforge.net/database/overview.html)
> was 2008, but the package was released 2009.
> The swig operations seem like black magic to me.
> 
> I do not currently have the time or need to work on this now, but I am
> willing to share my octave package (sqlite c interface wrapped, more or
> less).
> 
> Paul
> 
> 
> 2011-12-21 13:02, dirk skrev:
>> Thanks, Paul - those are good questions.
>>
>> I assume by "c interface" you mean ODBC?  I believe that would be best,
>> but requires more work... I suspect this is the direction Xavier took
>> with his database package.  
>>
>> Given a choice between perl, Matlab and "create your own," the community
>> would probably prefer a solution that "looks like Matlab." That is,
>> without a GUI and no Matlab-specific I/O, I assume. 
>>
>> What do you think?   
>>
>>
>> - dirk
>>
>> On Wed, 2011-12-21 at 09:34 +0100, Paul Dreik wrote:
>>> Hi, no you are certainly not the only one!
>>> I have also made an sqlite octave package, but only for private use. I
>>> think it is wise to discuss on how to implement the interface to such a
>>> toolbox.
>>> * should one mimic the c interface?
>>> * should one mimic the perl dbi interface?
>>> * mimic the matlab database interface?
>>> * make a new one?
>>> What is your opinion?
>>>
>>> This is the right place to discuss and send code suggestions.
>>>
>>> Paul Dreik
>>>
>>> 2011-12-20 23:37, dirkmay...@comcast.net skrev:
>>>> Hi all - 
>>>> Couldn't make the database package work, and after a reasonable amount
>>>> of googling I concluded I was not the only one.
>>>> As a solution I made my own .oct file that queries SQLite & returns a
>>>> cell array of the results; kudos to  SQLite's "amalgamation" file and
>>>> Octave's "mkoctfile."
>>>>
>>>> - is this the right forum to ask the next 2 questions?  
>>>> - is anyone interested in connecting SQLite to octave?
>>>> - what's my next reasonable step (if any): make a package, post code
>>>> somewhere (here?), or... ?
>>>>
>>>> thanks,
>>>> dirk mayhew
>>>> ps and thank you also to Xavier Delacour - I would use your code if I could
>>>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Write once. Port to many.
>> Get the SDK and tools to simplify cross-platform app development. Create 
>> new or port existing apps to sell to consumers worldwide. Explore the 
>> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
>> http://p.sf.net/sfu/intel-appdev
>> _______________________________________________
>> Octave-dev mailing list
>> Octave-dev@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/octave-dev
> 
> 
> ------------------------------------------------------------------------------
> Write once. Port to many.
> Get the SDK and tools to simplify cross-platform app development. Create 
> new or port existing apps to sell to consumers worldwide. Explore the 
> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> http://p.sf.net/sfu/intel-appdev
> _______________________________________________
> Octave-dev mailing list
> Octave-dev@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/octave-dev
octave-3.4.2:2> pkg install -forge database
In file included from /opt/local/include/octave-3.4.2/octave/../octave/oct.h:31,
                 from sqlite3_wrap.cpp:149:
/opt/local/include/octave-3.4.2/octave/../octave/config.h:2686: error: multiple 
types in one declaration
/opt/local/include/octave-3.4.2/octave/../octave/config.h:2686: error: 
declaration does not declare anything
sqlite3_wrap.cpp:1442: error: invalid covariant return type for 'virtual 
Octave_map octave_swig_type::map_value() const'
/opt/local/include/octave-3.4.2/octave/../octave/ov-base.h:560: error:   
overriding 'virtual octave_map octave_base_value::map_value() const'
sqlite3_wrap.cpp: In member function 'void octave_swig_type::install_global()':
sqlite3_wrap.cpp:1197: error: 'curr_sym_tab' was not declared in this scope
sqlite3_wrap.cpp:1197: error: 'link_to_global_variable' was not declared in 
this scope
sqlite3_wrap.cpp:1204: error: 'symbol_record' was not declared in this scope
sqlite3_wrap.cpp:1204: error: 'sr' was not declared in this scope
sqlite3_wrap.cpp:1204: error: 'global_sym_tab' was not declared in this scope
sqlite3_wrap.cpp: At global scope:
sqlite3_wrap.cpp:1650: error: invalid covariant return type for 'virtual 
Octave_map octave_swig_ref::map_value() const'
/opt/local/include/octave-3.4.2/octave/../octave/ov-base.h:560: error:   
overriding 'virtual octave_map octave_base_value::map_value() const'
sqlite3_wrap.cpp: In function 'void SWIG_Octave_SetModule(void*, 
swig_module_info*)':
sqlite3_wrap.cpp:2110: error: 'curr_sym_tab' was not declared in this scope
sqlite3_wrap.cpp:2110: error: 'link_to_global_variable' was not declared in 
this scope
sqlite3_wrap.cpp: In function 'octave_value_list _wrap_sqlite3_vmprintf(const 
octave_value_list&, int)':
sqlite3_wrap.cpp:3029: error: invalid array assignment
sqlite3_wrap.cpp: In function 'octave_value_list 
_wrap_sqlite3_auto_extension(const octave_value_list&, int)':
sqlite3_wrap.cpp:6861: error: invalid conversion from 'void*' to 'void (*)()'
sqlite3_wrap.cpp:6861: error:   initializing argument 1 of 'int 
sqlite3_auto_extension(void (*)())'
sqlite3_wrap.cpp: In function 'octave_value_list Fsqlite3(const 
octave_value_list&, int)':
sqlite3_wrap.cpp:10430: error: 'curr_sym_tab' was not declared in this scope
sqlite3_wrap.cpp:10430: error: 'link_to_global_variable' was not declared in 
this scope
make: *** [sqlite3.oct] Error 1
'make' returned the following error: CXXFLAGS="-pipe -m64" 
/opt/local/bin/mkoctfile-3.4.2 -Doctave_idx_type=int -DNEED_OCTAVE_QUIT 
-DHAVE_OCTAVE_34 -v -o sqlite3.oct -lsqlite3 sqlite3_wrap.cpp
/opt/local/bin/g++-mp-4.4 -c -fPIC -I/opt/local/include/octave-3.4.2/octave/.. 
-I/opt/local/include/octave-3.4.2/octave -I/opt/local/include 
-I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include 
-I/opt/local/include -pipe -m64 -Doctave_idx_type=int -DNEED_OCTAVE_QUIT 
-DHAVE_OCTAVE_34 sqlite3_wrap.cpp -o sqlite3_wrap.o
error: called from `pkg>configure_make' in file 
/opt/local/share/octave/3.4.2/m/pkg/pkg.m near line 1339, column 9
error: called from:
error:   /opt/local/share/octave/3.4.2/m/pkg/pkg.m at line 790, column  5
error:   /opt/local/share/octave/3.4.2/m/pkg/pkg.m at line 361, column 9

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to