Comments (2)
ODBC connection strings are a bit tricky. Please also note that it doesn't appear you are using the actual ODBC driver, but the ADODB/OLE based ODBC driver. You need to build your version using -tags odbc
to use the actual, "real" ODBC driver (also I can surmise you are on Windows... based on the info above).
So, couple notes:
- I haven't tried the Microsoft Access driver with ODBC, however it would work. The syntax for the DSN would actually be like this:
$ usql 'odbc+Microsoft+Access+Text+Driver+(.txt,+.csv):///?Dbq=c:\temp'
- You might want to try the Microsoft ACE driver instead, which works great with CSVs:
$ usql adodb://Microsoft.ACE.OLEDB.12.0/?Extended+Properties=%22Text%3BHDR=NO%3BFMT=Delimited%22
- I had been meaning to provide my own CSV driver, based on SQLite, but just haven't had the opportunity to implement it yet. Look for that relatively soon, in a future release.
- If you cannot get the ODBC driver to work directly, you can just use the
\c driver params
backslash command to connect by passing the exact driver parameters to the underlying ODBC driver:
$ usql
(not connected)=> \c odbc Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=c:\txtFilesFolder\;
Extensions=asc,csv,tab,txt;
Please note that this driver is used in usql
, so please refer to its documentation for specifics on specifying connections strings. I don't have a Windows system to test just now, but I will make a point to try to test this to see if it works properly.
from usql.
Thanks for the reply, looking forward to the CSV driver that is part of usql
I didn't have any luck with the Microsoft Text Driver - (may be a 32bit vs 64bit thing)
The Microsoft.ACE.OLEDB.12.0 seems to work
from usql.
Related Issues (20)
- Is there any plan to support parquet or orc format? HOT 2
- [PATCH] A handy conninfo output HOT 2
- error csv upload with pgx driver (encode date column) HOT 14
- Executing SQL files without semicolon as end-of-statement HOT 9
- Prevent irrelevant output with CSV format
- Support log message for NOTIFY/LISTEN HOT 4
- uniqueidentifier formatting on sql server HOT 16
- No foreign keys displayed on sql server HOT 1
- Is terminal graphics in WezTerm under Windows supposed to work? HOT 1
- feature: connection aliases HOT 4
- '\timing on' not work in greenplum 6 HOT 5
- paste multi-line sql is a bit slow? HOT 2
- feature: add duckdb driver to base drivers HOT 1
- version 0.17.5 quit sliently on windows 7 HOT 2
- numbers displayed as 1.450817032e+ HOT 5
- I hope to add a feature similar to the grep filtering in Linux. HOT 3
- couchbase error: n1ql: Connection failed Post
- Feature request: implement the \bind meta-command HOT 6
- Using usql as a library (or subprocess) HOT 5
- Batch insert in \copy to DB destination HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from usql.