Questions tagged [databaselink]

DatabaseLink is a toolkit for working with SQL databases built into Mathematica.

Filter by
Sorted by
Tagged with
18
votes
1answer
290 views

DatabaseLink and Libreoffice odb

Preface In scientific projects, I often deal with large Excel files from partners as this is unfortunately still the way to store data. Always, one of my first steps after importing the data is to ...
17
votes
1answer
352 views

What are the benefits of Entity Classes for Databases?

To me, using the older database functionality is much simpler: ...
14
votes
1answer
376 views

Benefit of using Dataset to collect SQLSelect output

Considering a DatabaseExample included with Mathematica: ...
13
votes
1answer
1k views

Microsoft SQL DatabaseLink connection using Windows Authentication

For those who use Mathematica with databases in companies, a common way to securely connect to those is using Windows Authentication (detailed here). Mathematica doesn't seem to support this ...
12
votes
2answers
256 views

How to extract Bitmap image from SQL records?

I'm trying to extract image from records of the MSSQL demo database NorthWind with this codes, ...
11
votes
3answers
620 views

How can I speed up SQL queries in Mathematica?

I have an application that queries a MySQL database many times for data. At the moment, Mathematica and MySQL are running on the same box and yet it takes over 1.6 seconds for the query to run and ...
11
votes
3answers
1k views

JDBC-to-ODBC bridge gone. How to connect to SQL Server now in case of Windows Authentication?

Connecting to our corporate SQL servers using JDBC never worked for me, perhaps related to the Windows Authentication method that is necessary in our network. However, I found out that configuring the ...
11
votes
3answers
8k views

Connect to SQLite database

I am trying to connect to a SQLite database and since there is no officially supported driver; I decided to use the sqlite-jdbc driver and port the respective code into Mathematica. However, the ...
11
votes
1answer
1k views

Slow work of SQLInsert with MS SQL Server in V10

This question is very similar to: Slow work of SQLInsert with SQLite, but for MS SQL Server. Unfortunately the use of SQLBeginTransaction and ...
10
votes
3answers
1k views

How to check if a database connection is open?

...
10
votes
3answers
2k views

Slow work of SQLInsert with SQLite

I want to store my data in SQLite database, but writing large numbers of data its too slow. For example: ...
10
votes
1answer
679 views

Is there a way to print out SQL queries made using DatabaseLink?

I have a Mathematica batch script which makes some MySQL queries using DatabaseLink to store parameters of the run in a database. Recently, I had a run where these queries failed, and there was no ...
9
votes
1answer
273 views

OpenSQLConnection problem - password visible

Prerequisites some database (here, it's called sakila (mysql standard test db I think)) a user (with password) that has access to that db (I'll use u:testuser/p:testpass) Setup - minimal (?) working ...
8
votes
3answers
2k views

How to connect Mathematica 9 to MS SQL 2012 using Windows 7 enterprise (64-bit)

I have used Microsoft Open Database Connectivity (ODBC) with Mathematica 8.0 and MSSQL 2008 on Windows XP, but I can't get it to work on Windows 7 Enterprise (64-bit) with Mathematica 9.0.1.0 and MS ...
8
votes
1answer
4k views

How can I connect to a database using the 32 Bit ODBC on a Windows 7 (64 Bit) machine?

I am having difficulties using a DSN that was defined in the 32 Bit version of the ODBC-manager? (there are two separate managers for 32/64 Bit on a 64 Bit machine) Using the DatabaseLink package ...
8
votes
1answer
137 views

Why has this SQLInsert behaviour changed?

Using Mathematica 11.1 to insert into a MySQL table with this schema... ...
8
votes
2answers
1k views

Trying to extract information from an MDB file. Import is too slow

I am running a Linux box and as usual the documentation for this type of box is not great. I am trying to open up and extract and possibly include later on information from a "mdb" file. The file ...
8
votes
1answer
525 views

Stealth daylight saving shift in SQL data

I'm querying a SQL database with DatabaseLink and resulting SQLDateTime objects are shifted by an hour during daylight saving ...
7
votes
2answers
696 views

How to speed up interpreting numbers from strings?

In processing a large text file I have batches from ReadList of 100,000 Records of the form. ...
7
votes
1answer
113 views

How to do a database query on substrings?

With the package DatabaseLink I can open a connection to my MYSQL database. Then I can use SQL commands like ...
7
votes
1answer
375 views

Complex queries to MS SQL Server

I'm using DatabaseLink to query MS SQL Server with SQLExecute which works totaly fine, for ex.: ...
7
votes
2answers
1k views

DatabaseLink`: MySQL query with client/server compression

I'm trying to reduce transfer time when accessing rows of a mysql table over a network, where each row has a lot of data. Is there a way to enable client-server compression when accessing a mysql ...
7
votes
2answers
339 views

Connecting to Microsoft SQL with version 10

After upgrading to version 10, functions relying on a connection to a Microsoft SQL database no longer work. When I attempt to open a connection with something like: ...
6
votes
2answers
1k views

SQLite and Mathematica

I want to connect to a local database with Mathematica. I used DB Browser for SQLite to create the database with a single table and then exported it locally as a .sql file. To access the database I ...
6
votes
2answers
662 views

What is the quickest way to convert a lot of SQLDateTime[] objects to DateLists

I often run database queries that return sets of {date, datum} objects. A hypothetical query looks like ...
6
votes
4answers
2k views

MySQL Connection Problem

I have a problem with the configuration of the J-Connector plug-in with a MySQL database. Most of the time all works well, but sometimes the connection remains blocked for 2 hours and then it gives ...
6
votes
3answers
1k views

Correct behavior of lock file in hsqldb connection

I'm running in to some problems with generating a persistent HSQLDB and during some troubleshooting I came upon the following behavior. ...
6
votes
1answer
416 views

How to update bundled SQLite library (or driver?) in V10 for OS X

I've been using undocumented Database functions with Mathematica V9 to acces my SQLite database, which is a Firefox-generated database that contains cookies. ...
6
votes
1answer
566 views

Using cursors with result sets to reduce memory usage

I have a database table with 900,000 rows and 80 columns per row which I'd like to work with in mathematica. My computations are isolated to each row, so I'd like to stream only a single row (or small ...
5
votes
3answers
1k views

Working with a database

I just started to work with a database through Mathematica. I have a large data set. I use an .mx file to store my data. Now I have to store the data in a database, ...
5
votes
1answer
1k views

Insert large amount of data in HSQL

I create HSQL database with one table ...
5
votes
1answer
71 views

Retrieve column data from MongoCollection

I am connecting to a mongo database from Mathematica. I can get a MongoCollection object, but can not get a column of data from it. ...
5
votes
1answer
228 views

SQLInsert'ing Null into a table (not SQLite)

Is it possible to insert Null values using DatabaseLink, without formatting the query string manually? Hans found (below) that this works for SQLite, so it appears ...
5
votes
1answer
138 views

Can I store a DataDistribution in a database?

I have a DataDistribution data = KernelMixtureDistribution[RandomVariate[NormalDistribution[], 10^5]] that takes a long time ...
4
votes
1answer
82 views

Local Storage of Periodically Collected Data (without using DataDrop)

I would like to take periodic measurements (e.g. noise levels and temperature in my office from a Raspberry Pi, etc.), say, every minute and have a long-reaching record of this similar to Stephen's ...
4
votes
1answer
77 views

Context of SQLBinary in Package

I have the following code for a simple key value store for binary data: ...
4
votes
1answer
353 views

How do I put a Monitor into CDF?

I would like to keep track of progress of a database request in an Enterprise CDF, but it won't allow PrintTemporary or Monitor[]...
4
votes
1answer
206 views

How can I write image to MySQL database?

I have a database, such as: In Mathematica, the final code is: img1=Export["/home/user/Desktop/1.jpg",resultimg1]; I tried ...
4
votes
1answer
175 views

Connection to SQL server databases from Mathematica

I am an SQL developer and very new to Mathematica. As per my requirement I need to make a connection from Mathematica to my sql server database, after which my client will do some analysis with the ...
4
votes
1answer
333 views

How to get data from DB into dataset with keys

I'm a Mathematica newbie and I have the following problem: I connect to a Oracle DB and read out a set of variables, further on I want to histogram some of the variables. A Dataset seems to be the ...
4
votes
0answers
88 views

Mathematica not releasing RAM

The following code is supposed to sequentially read data from a large CSV file and put it row by row into an SQL server. Although I thought RAM consumption should be constant the system keeps asking ...
4
votes
0answers
321 views

How to OpenSQLConnection with JDBC for “Microsoft Excel”?

I have a very large Microsoft Excel file that will not Import even after setting a 5GB heap size for Java as follows. ...
4
votes
0answers
62 views

Mathematica 10.3 on Windows 10 Home Premium Connection to SQL Server 2016 [duplicate]

Having installed sql server 2016 evaluation copy. I have setup a sample database using sql server management studio. Typed the following in mathematica ...
4
votes
0answers
193 views

Is it possible to specify GMT as default in OpenSQLConnection or JDBC?

I'm connecting to a PostgreSQL database, with tables containing TIMESTAMPs with timezone, using ...
3
votes
1answer
324 views

Maintaining SQLConnections

I'm using SQLConnection to database in repetitive ScheduledTask. To prevent creation of new connections, and to maintain binding ...
3
votes
2answers
431 views

Handling error in database connection (TimeConstrained)

I have a lot of scripts that use a database connection, and I have realized that my code should be protected against errors in my connection. For example, when my database is out for some technical ...
3
votes
2answers
527 views

I have a bigdata CSV file as a single table of five columns and almost 10 million rows

I need to examine the bigdata file with a database/DBMS and have used MS Office 365/Access successfully so to do, import and query. I have also tried, many times, to open a MMA 10.4 database link ...
3
votes
1answer
697 views

How can I connect database(MSSQL Server) with Mathematica?

Newly I started working with database(MSSQL Server 2012). by google help, I created Table name as EmployeesList and also ...
3
votes
1answer
197 views

Cloud Form Function Database

I am trying to build a web inventory application using a SQLite database hosted in the cloud home directory. I have a database in the home directory and I can query that database while in the code ...
3
votes
0answers
50 views

Error in DatabaseLink when trying to select from multiple tables

I've noticed a rather inconvenient (assumed) bug when selecting data joined across multiple SQL tables. Example: ...