 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
ScottEdge
Joined: 14 Aug 2005 Posts: 57 Location: Connecticut,USA
|
Posted: Tue Mar 07, 2006 4:37 am Post subject: ODBC to CSV, XLS, or HTML |
|
|
Anyone looking to try to connect to an odbc table to work with autohotkey can check out the following.
http://bitdaddys.com/odbc2xls.html
you can automatically setup the connection and then run your sql queries from a file through command line to write to a csv file. You can also find a free odbc to csv command line tool there as well with zero documentation on how to use it. Tried other solutions suggested here on the forum but this was the easiest and only one I could get working.
**update: the programer has resolved the issue with the password. There is a maximum sql length I'm not sure what it is (its pretty long). Also you can write just the value designation to a file before running the program you don't need the commented messages created in the fsql file created from the program.
Last edited by ScottEdge on Sun Mar 12, 2006 7:09 am; edited 1 time in total |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Tue Mar 07, 2006 8:07 am Post subject: |
|
|
Thx for sharing it. Much appreciated.  |
|
| Back to top |
|
 |
Slaya Guest
|
Posted: Wed Mar 08, 2006 9:56 pm Post subject: |
|
|
Also try ODBC View it's free or charge supports output to csv and can be called though the commandline as well.
http://www.slik.co.nz/downloads.htm
~Slaya |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Mar 10, 2006 5:41 am Post subject: |
|
|
| just a heads up on odbc2xls there is a bug in the program if your password starts with "yn" it doesn't store it proberly for retrieval later. I've submitted this to the programer hopefully they will fix it. |
|
| Back to top |
|
 |
ScottEdge
Joined: 14 Aug 2005 Posts: 57 Location: Connecticut,USA
|
Posted: Sun Mar 12, 2006 11:03 pm Post subject: |
|
|
two more ODBC utilities both cost money though.
| Quote: | ODBC 4 ALL is a 32 bit Windows utility designed to easily allow any application, including DOS apps and batch files, to run SQL queries using any ODBC data source, (Access, Informix, MySql, Oracle, Sql Server, ...), redirecting the output to the screen, an ascii file / table or a DBF table.
When run in interactive mode, you can interactively choose the ODBC Data Source and Table, then insert the SQL command to send to the database server. If the command is a SELECT, the SQL results will be automatically shown on a screen grid, while INSERT, UPDATE etc. usually do not provides any output.
To use it inside a 3rd party application, you can create an ascii configuration file, then run ODBC4ALL.EXE to obtain the results of the SQL query into the desired output format.
In this case user intervention is not required. Even the error messages could be redirected to an ascii file (for example if the SQL query contains a syntax error, or if the database server is unreachable because the server PC is down) allowing the running application to check for errors before managing the results.
http://www.guolo.com/odbc4all/
|
| Quote: |
ODBC2XML is a database publisher that merges data from any ODBC data source into XML documents. Its unique architecture uses predefined XML templates that contain embedded SQL queries, and generates documents that contain the ODBC data merged into the original XML. It comes complete with a callable DLL and a command-line interface for batch processing.
ODBC2XML simplifies the generation of complex XML documents. It allows non-programmers to generate sophisticated XML files without the need for scripting languages, report writers, or other more complex processing tools. Using ODBC2XML, you can:
merge data from Oracle, SQL server, Microsoft Access, Excel spreadsheets, or any other data source with an ODBC driver, into XML files;
generate XML tables and lists containing database data (for applications such as parts catalogues);
merge XML microdocuments from a relational database into "master" XML document (for applications such as user manuals that share feature writeups across a range of products);
generate large volumes of XML based on simple, repetitive changes in one part of the document;
generate traditional relational database reports, but within an XML "wrapper" for sophisticated formatting via XSL; and
generate XML test data.
http://www.intsysr.com/odbc2xml.htm |
|
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Tue Mar 14, 2006 3:15 pm Post subject: |
|
|
Yet another command line ODBC tool...
http://www.dmst.aueb.gr/dds/sw/outwit/
(untested) _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
ScottEdge
Joined: 14 Aug 2005 Posts: 57 Location: Connecticut,USA
|
Posted: Thu Apr 20, 2006 10:44 pm Post subject: |
|
|
http://www.navicat.com/product.html
Here is another ODBC tool. It only connects to MySql tables and it costs $100 to $140 depending on your version. Many of the operations can be run from command line including running queries.
| Quote: | Main Featured Functions of Navicat MySQL (Window Version):
* Timeout Reconnection for SQL server
* Data and Structure Synchronization
* New Query Builder - create query from different databases
* Query Parameter
* SQL Console
* View Builder
* Views, Stored Procedure and Triggers creation
* Private Key for SSH Tunnel
* Supports all MySQL versions
* SSH Tunnel
* HTTP Tunnel <new>
* Foreign Keys
* Foreign Key Data Selection <new>
* Unicode and Character Set Support
* Edit text in Blob field
* Print Table Structure
* Import data from ODBC
* Import / Export data up to 18 most popular formats including MS Access, MS Excel, XML, PDF and TXT.
* Create Schedule for Backup, Import / Export, Data Transfer, Saved Queries and Data Synchronization.
* Create Reports with visual Report Builder
* Report Archive - Reports can be saved as an archive file (.raf) for backup and increased portability.
* Create Report Archive from command line
|
|
|
| Back to top |
|
 |
ScottEdge
Joined: 14 Aug 2005 Posts: 57 Location: Connecticut,USA
|
Posted: Sun Mar 11, 2007 7:47 pm Post subject: Another ODBC utitlity |
|
|
I ran across this utility outside of AHK but twhyman did talk about it in this post
http://www.autohotkey.com/forum/viewtopic.php?t=3404&start=15
anyway to run sql statements against an ODBC database you can use sqlrun.exe
| Quote: | ODBC SQL runner is the command line tool for run SQL statements using ODBC32 data sources.
Usage:
sqlrun [optional params] [filenames]
Params:
-I[<config file name>]
* by default uses sqlrun.ini in program directory.
* empty arguments list means -I
* see config file format below
-D<data source name>
-U<user name>
-P<password>
-O<standard output file name>
* uses terminal output by default
-L<log file name>
* uses terminal output by default
Note: parameter in command line overwrites value from config file.
|
http://www.sqledit.com/odbc/runner.html
http://www.sqledit.com/download.html |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|