[firebird-support] Plugin(?) for external tabels in CSV or Excel?

2019-10-09 Thread Kjell Rilbe kjell.ri...@marknadsinformation.se [firebird-support]
Hi,



We work in .NET and C# and we often import and export Excel or CSV data. 

It would be really good to be able to select from and insert (append) 

directly into an external CSV file or Excel file.



I am aware of the currently supported external table feature, but the 

format is rather difficult to use, especially for non-char data nd for 

char data in encoding with variable length characters (e.g. UTF8). I 

have written a tool to create such files (with UTF8 strings), but it's a 

free standing app and I need to prepare the file first, then use the 

tools generated DDL to create the external table within Firebird, before 

I can actually access the data from SQL.



I know new FB verions has support for plugins and as far as I understand 

even a separate engine could be plugged in, right? (I may be wrong here, 

haven't read up on it properly...)



Anyway, would it be possible to write some kind of plugin to FB 3 to 

allow it to select from or insert into either CSV or Excel files or 

both? I would code the actual plugin myself, of course. I'm just asking 

if it's worth investigating (not waste time if it's a known dead end).



If it is indeed possible, I'd appreaciate some pointer how to get 

started: relevant docs or some sample code, or whatever.



If I'm successful I'd be happy to open source it, but if I am to write 

it, it will be C#/.NET (too much effort for me otherwise).



Thanks,

Kjell





[Non-text portions of this message have been removed]



Re: [firebird-support] Plugin(?) for external tabels in CSV or Excel?

2019-10-09 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
09.10.2019 17:24, Kjell Rilbe kjell.ri...@marknadsinformation.se 
[firebird-support] wrote:
> Anyway, would it be possible to write some kind of plugin to FB 3 to
> allow it to select from or insert into either CSV or Excel files or
> both? I would code the actual plugin myself, of course. I'm just asking
> if it's worth investigating (not waste time if it's a known dead end).

   The main problem with this is fixed metadata for every database object. If 
it is fine 
for your purpose, you can start from coding UDR returning result set from a 
file of any 
(including CSV) format.


-- 
   WBR, SD.






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/