Questions tagged [databaselink]

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

Filter by
Sorted by
Tagged with
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: ...
3
votes
0answers
214 views

How do I insert Unicode into a MySQL database?

I'm having trouble transferring Unicode strings from one MySQL database to another using DatabaseLink` functions. Here is my failed attempt to read a string from ...
3
votes
0answers
1k views

Problem inserting data into a mysql table with column names having a space

I have a mysql table whose column name has space. I tried inserting the data into this column. I got an error I tried a sample code, which tests accessing the columns with a space and that returns ...
3
votes
0answers
494 views

Microsoft SQL DatabaseLink connection using Windows Authentication from Mac

We know that Mathematic doesn't natively support Windows Authentication connect. But as we can see in this post, the problem can be easily solved when your Mathematica is in Windows version (I have ...
2
votes
2answers
1k views

How can I import images from a Microsoft SQLServer database?

I have a table with binary data (images) in Microsoft SQlServer. I want to import that data and convert it into Image format. I wrote the following code, but it's ...
2
votes
1answer
149 views

Connection to SQL server - Failed

I have a test database created by the colleagues from IT department and I can also access / see it using MS SQL Server Management Studio 2016. However, I cannot establish a connection to it from ...
2
votes
1answer
63 views

Is there a way to define primary keys using SQLCreateTable?

I would like to create a db table and specify the primary key columns using the command SQLCreateTable. I know I could use SQLExecute but in this case I'm only interested in the right parameters for ...
2
votes
3answers
818 views

What format to use to store expressions in database?

I am storing lists of expressions into a MySQL database. Each list is of form {_String, {_String, _Real}, _Real} What data format should each column of the ...
2
votes
1answer
53 views

How to select a SQLConnection from SQLConnections[] by its “Name” property?

When creating a SQLConnection you can give it a name with the "Name" option. The connections are also added to the output of the ...
2
votes
1answer
217 views

OpenSQLConnection error

I used to be able to connect to a SQL Server database. I haven't run this program for a few months. I tried it today and it failed, so I went back to try OpenSQLConnection[] and got the following ...
2
votes
1answer
126 views

DatabaseLink Example for DB2 and Mathematica

could someone please point me to good example on how to make a JDBC connection to an IBM DB2 database?
2
votes
0answers
84 views

SQL Group By using SQLSelect

I would like to use the SQLSelect[] function in Mathematica 11 to get aggregated data from a large database. Is using SQLExecute ...
2
votes
0answers
139 views

Random sample from sql database uniformly over time [closed]

I'd like to sample rows from a table uniformly over time, here is the naive way to do this: SELECT * FROM table ORDER BY RAND() LIMIT 10000 Unfortunately, ...
2
votes
0answers
93 views

OpenSQLConnection SSPI Library Not Loaded [duplicate]

I am attempting to open a connection to SQL Server with Windows Authentication (SSPI) using OpenSQLConnection and JDBC. ...
2
votes
0answers
328 views

Can Mathematica use a MySQL ODBC connector?

I have a MySQL database that I connect to using Mathematica and would like to distribute my Mathematica code to others. We already have ODBC DSNs setup on peoples machines using the MySQL ODBC ...
1
vote
2answers
42 views

Insert a DateObject into MySQL database?

I want to use Mathematica to do some SQL tasks like insert. However, I have difficulty in inserting date into SQL. Here is an example. ...
1
vote
1answer
110 views

How can I “ORDER BY” using SQLSelect?

A pretty straightforward problem, you would think, but I cannot seem to find the answer in the documentation for SQLSelect. The query I want to run is the following: ...
1
vote
1answer
137 views

Multi-table SQLSelects

I'm trying to figure out how these statements really work, and am having some trouble with the documentation (and the software!). Using the example publishers database (Mathematica 8), the following ...
1
vote
1answer
293 views

I cannot get tables names and columns names from database

I am working with database using OpenSQLConnection-JDBC. I am able to fetch the data perfectly from the tables but I cannot get nor the names of the tables (using SQLTableNames) neither the column ...
1
vote
1answer
248 views

Package functions not loaded after successful `Get` (`<<`) [closed]

I have the following package: ...
1
vote
1answer
86 views

How to specify the number of precision digits for columns using DatabaseLink functions and options

Some databases (e.g. MySQL) does not store decimal places for seconds unless the number of digits needed is directly specified (e.g. DATETIME(4) for 4 digits) when creating the table in the database. ...
1
vote
1answer
157 views

Creating a Dynamic MSSQL connection

Hello i am trying to create a notebook that automatically connects to a database on MSSQL server and would then query this to create a sort of personal report. I have connected to this database and ...
1
vote
0answers
67 views

Probable Bug in SQLColumn condition < upper limit for SQLSelect

I have a perfectly good SQLSelect query that doesn't work if and only if it contains an extra < condition on a column already used. Details follow... This SQLselect shows that the expected data ...
1
vote
0answers
40 views

Integer data type mapping problem with SQLInsert in DatabaseLink package

I am working with a following SQL table named "ticket". Now let's see the data types for the columns. ...
1
vote
0answers
74 views

Using MemberQ or Contains* in a query fails

Using MemberQ or Contains* in a query fails: ...
1
vote
0answers
127 views

Using Mathematica to connect to Cloudera Impala

I am trying to connect to Cloudera Impala via Mathematica, but so far I have not been able to do so. Has anyone ever done it? I have been able to connect to it via R using the JDBC or ODBC interface ...
1
vote
0answers
215 views

Awkward DatabaseLink JDBC Error [closed]

I've created a GUI application (a database editor) that uses DatabaseLink and it is currently working fine on my PC (M10.02, Windows 7) and on a clients's PC (CDF Player Pro 10.02, Windiws 8). While ...
1
vote
0answers
47 views

How to identify primary keys in an existing database table

I would like to identify the primary keys in a DB table using DatabaseLink commands trying to exclude SQLExecute. It seems like SQLTableInformation or SQLColumnInformation may not show that ...
1
vote
0answers
48 views

Need a recommendation for managing a database link

I want to make a package which needs to have a external database link. But it is hard for me to have an idea about how to manage the database link. I want the link to be connected as long as I use the ...
1
vote
0answers
69 views

SQLDateTime from a time column is missing the milliseconds component

Can anyone confirm this? I am using M9.0.1 on win7 64bit connecting to a SQL Server db. When I fetch a datetime column the SQLDateTime objects contain 6 entries, 5 integers and a fractional second ...
1
vote
0answers
130 views

Connect to a MS Access database (*.accdb) [duplicate]

The JDBC Connections section of the help file http://reference.wolfram.com/mathematica/DatabaseLink/tutorial/DatabaseConnections.html gives me the impression that I can connect to a MS Access Database ...
0
votes
2answers
132 views

Performing analysis of data extracted from an SQL database

Below is an SQL query that I generated using DatabaseExplorer as well as a small sample of the result. How, att this point, can I perform analysis on the results ...
0
votes
1answer
145 views

Error Using Mysql In Mathematica

I'm using Mathematica, and accessing mysql through mysql (Connector/J). When I try to update a field in my table using WHERE statement, all the rows get updated <...
0
votes
0answers
27 views

Conversion of numerics to/from database Real

I am writing data from MMA (11.0.1.0, Win 10 home 64 bit) to a Microsoft SQL Server/T-SQL database and am having considerable trouble controlling precision. The target column in the database has data ...
0
votes
0answers
37 views

SQLConnection causes kernel hangs

This question is additional question to Maintaining SQLConnections In Mathematica 10.4.1.0 (64bit). ...
0
votes
0answers
78 views

SQL export data

I have data imported from excel file into mathematica but mathematica automatically converts large number into scientific form and when transferring this data to sql string field i get the following .....
0
votes
0answers
40 views

How to set primary key in SQLCreateTable to be auto_increment

I'm trying to create a table using SQLCreateTable. What I need is auto incremented primary key. My table will be growing in time and I don't want to check previous value of primary key every time I ...
0
votes
0answers
59 views

How to pass a table type parameter to SQLExecute?

In MS SQL Server 2016 I have a table type parameter: CREATE TYPE dbo.Ids AS TABLE (Id INTEGER NOT NULL); and a stored procedure: ...
0
votes
0answers
109 views

Mathematica SQL command that counts records in table

Is there a DatabaseLink command other than SQLExecute that can be used to count the total records in a database table?
0
votes
2answers
1k views

Network database access - How do I connect to a remote database?

I am able to connect to a specific MS Access Database when it is on the same Windows computer as Mathematica via the command ...
-2
votes
2answers
485 views

How to push the data from database?

I want to push the data from database to Mathematica application instead of application(MM App) pull the data.I have installed ms sql server and apache tomcat server. I have my application in apache ...