0 Followers · 182 Posts

Open Database Connectivity (ODBC) is a standard application programming interface (API) for accessing database management systems.

Learn more.

Question Oliver Wilms · May 27, 2020

Hello,

I work as a contractor for the Department of Veterans Affairs. I want to read data from an Excel workbook. I searched posts here and saw Apache POI suggested. I believe Apache POI is not approved for use within VA. I also believe we should be able to run SQL query against Excel. Has anybody done such a thing or are there other ways to read data from Excel workbooks?

Thanks

11
0 1509
Question Jeffrey Drumm · Jan 6, 2020

While I can query the HL7 message class EnsLib.HL7.Message (EnsLib_HL7.Message for SQL) to my heart's content in the SQL Shell or the Management Portal's SQL page, I can't seem to SELECT anything other than ID/%Id from an ADO/ODBC client. Properties such as TimeCreated, Name, MessageTypeCategory, etc. all seem to prevent the query from ever completing EXCEPT when I provide the ID as part of the WHERE criteria.

This works fine in the Management Portal and Shell:

7
0 506
Question Ken Wenze · Jan 6, 2020

Where can i get the latest odbc providers from SQL Server 2012/2016?

I see some posts on line to  an ftp site out there but I am unsuccessful at getting access to it.  I have a version loaded on my server but get errors when querying cache'.

"[Cache ODBC][State : 22005][Native Code 22005]" 

Any help would be appreciated.

the one we have might be version  2014.01.05851  64 bit (would that make sense?)

4
0 1783
Question Brian Cromwell · Feb 4, 2020

I am developing a viewer for Crystal Reports using the Crystal Reports for Visual Studio (CR13SP26).  I have also installed the latest ODBC Drivers for Cache, but when I connect some reports to the Cache database using a connection string, I get an error that I failed to retrieve data from the database, and it reports the Database Vendor Code 30.  Has anyone used Crystal Reports connecting via a connection string and received this error?  If so, how did you correct it?

Thank you,

Brian Cromwell

2
0 952
Article Tony Coffman · Feb 6, 2020 1m read

Hello Community,

Thank you all for your continued feedback and support of our ad hoc reporting platform, VDM.  There's been some questions around setting up a non-ODBC connection for InterSystems platforms.  We published a new YouTube video showing the steps necessary to connect to InterSystems Caché and InterSystems IRIS with BridgeWorks VDM. 

0
3 270
Question Sam Clarke · Jan 30, 2020

Cache / Ensemble version 2016.2.2.853.0

I have a need to restrict ODBC access to certain users to prevent unwanted access to our cache database.

We have a limited number of legacy applications that use ODBC to connect to read data and are currently not in a position to have these amended any time soon so in the interim, I am hoping someone will be able to provide me with some assistance.

Any suggestions on where to start?

1
0 484
Question Oliver Wilms · Nov 28, 2019

Hello,

I work with Ensemble Business Operation with SQL Outbound Adapter. I try to query a DSN defined database that happens to be Cache on the same machine in the same instance of Healthshare 2017.1.3. This worked fine on Linux server when I used JDBC driver. Now I want to run it on my Windows 10 laptop. I set up DSN and I can test connection successfully. I provided DSN in Operation DSN setting and I tried with and without Credential. I get ERROR <Ensd>ErrOutConnectFailed: ODBC Connect failed for 'myDSN'  / 'myDSN' with error ERROR #6022: Gateway failed: DSN/User Connect.

3
0 908
Question Ikara Ikliki · Nov 13, 2019

I have SQLCompute with SQLComputeCode on a couple of Properties in my class.

These work fin when I insert/update via ObjectScript or SQL from the ManagementPortal.

However, if I insert (create new record) via my C# app using the Caché ODBC DLL the SQLCompute is ignored, it does not run.

Is this expected InterSystems Caché behaviour? We are on latest IRIS platform.

7
0 512
Question Matthias Ruckenbauer · Aug 29, 2019

Hi folks,

My fist post here and a tricky question right away!

I have a remote MySQL database table ("SomeData"; not under my control), and a Caché-class (remote.SomeDataAccess) linked to it via ODBC using the link table wizard.

The remote table has a field "id" which is the primary key and an autoincrement bigint value. This has been considered in the setup and the generated class has an

Index MainIndex On id [ IdKey ];

which looks fine to me. The storage is

Storage GSQLStorage{<StreamLocation>^remote.SomeDataAccessS</StreamLocation><Type>%CacheSQLStorage</Type>}
3
0 528
Question Alexei Konoferchuk · Jun 6, 2019

Hello,

There is a problem connecting clients through ODBC.

"ERROR [08S01] [Cache ODBC][State : 08S01][Native Code 459]
Connection via cconnect failed: 
TCP connect() failed - exception satisfied select().
Reason: (10061, 0x274d) No connection could be made because the target machine actively refused it."

Error sometimes occurs. In cconsole.log there are only messages about high CPU usage.

ODBC and Cache version Cache for Windows (x86-64) 2013.1.4 (Build 801).

Any suggestions?

3
0 4117
Question Amir Samary · May 7, 2019

Hi!

I was trying to create a query that can be exposed as a stored procedure (function actually) that would return a resultset with a random number of columns. 

Unfortunately, it seems that unless I specify the ROWSPEC annotation on the Query method, I won't get any columns exposed. I was hoping to implement QueryNameGetInfo method and specify the names and number of columns I would be returning dynamically. But it seems that GetInfo information is simply ignored.

Here is my code:

5
0 724
Question Jeremy Forsyth · May 10, 2019

Cache version: Cache for Windows (x86-64) 2017.2.1 (Build 801_3U)

Good Afternoon,
I have a co-worker who is trying to run the below query via ODBC. The issue is that the query appears to be running extremely slow (nearly 2 hours).

SELECT A.RecNo, T.SDSInstID, T.TranEffectDate, COUNT(T.InternalTXID) as NoofTransactions
FROM SDS_DATA._Transaction T
INNER JOIN SDS_DATA.DataFeed A
on A.BankAccountBSB = T.BankAccountBSB
and A.BankAccountNo = T.BankAccountNo
WHERE T.TranEffectDate >= DATEADD(yy,-1,CURRENT_DATE)
GROUP BY A.RecNo, T.SDSInstID, T.TranEffectDate

 Below is the generated query plan
 

3
0 1038
Question Marco den Hartog · Mar 6, 2019

Hi community,

I have a rights problem when giving a user permission to perform some select queries on particular tables. So I have created a user with the following rights.

So this all works well. No problem so far. But the customer is using a program where you can easily build visually the query by selecting the table, choose the right colums etc. So the problem we have is when I give the user the Role %All the tables are shown.

6
0 661
Question Stephen De Gabrielle · Feb 1, 2019

Hi,

I'm writing to an ODBC connection to a SQLserver database, and I seem to be sending the wrong data type to a date colum?

set tSC = ..Adapter.ExecuteUpdate(.intRows,sqlInsert,$ZDATETIME($NOW(),3,2), pRequest.ComposerName, [...])

I think  `$ZDATETIME($NOW(),3,2)` is ODBC datetime format: 

https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_fzdatetime#RCOS_fzdatetime_tformat

Do I have it wrong?

Stephen

3
0 589
Question Alex Van Schoyck · Jan 31, 2019

Problem

I got a quick answer from this forum yesterday so I'm going to try my luck again today!  I've hit an error in another table when trying to extract through the Cache ODBC driver, but this one gives me less details and I'm struggling to pinpoint what might be causing the error.

The table I am trying to extract is called REF_TABLE_ONE.

Here's the Error:

[Cache Error: <<NOLINE>%0AmBx1^%sqlcq.PRD.2249>]
[Location: <ServerLoop - Query Fetch>]

Research/Trial & Error

3
0 1281
Question Alex Van Schoyck · Jan 30, 2019

Problem

I'm working on exporting data from an Intersystems Cache database through the Cache ODBC Driver. There is a particular table that is giving me an error message. The ODBC Driver crashes and reports an error from the Cache system. I think I was able to trace down where the error is coming from, but I do not know how to debug or fix the error.

The table I am trying to extract is called SEDMIHP.

Here's the Error:

[Cache Error: <<UNDEFINED>%0AmBd16^%sqlcq.PRD.3284 ^SEDMIHP(4,77)>]
[Location: <ServerLoop - Query Fetch>]

Research/Trial & Error

2
0 1659
Question Stephen De Gabrielle · Dec 20, 2018

Hi, 

I'm working on my first SQL service using the SQL inbound adaptor, and I'm having trouble. 

I've been following the documentation but it errors on  set req=##class(ESQL.request).%New()

Would anyone be kind enough to share a working example?

Kind regards, 

Stephen

1
0 525
Question Robert Osborne · Dec 13, 2018

Hello All,

Hoping someone can help with this odd error.

A vbscript file is being used to perform an update to cache.

The file has worked without an issue for well over a year.

Recently, the update has begun to throw an error.

(class references modified to remove client data)

UPDATE CACHE.UCI.Reg.Pat (Column1) VALUES ('USERNAME') WHERE ID = '2190284'

C:\Web\Config\SchedTasks\script1.VBS(73, 6)

Microsoft OLE DB Provider for ODBC Drivers: [Cache ODBC][State : S1000][Native Code 105]

[c:\Windows\SysWOW64\cscript.exe]

[SQLCODE: <-105>:<Field validation failed in UPDATE>]

[Location: <ServerLoop>]

3
0 656
Question Mark Anthony Manalo · Jun 4, 2018

Hi Everyone,

I am trying to built a SSIS package thru BIDS Visual Studio 2013. My Datasource is a InterSystems Cache Database, I wanted to Import Tables records from the Datasource to MS SQL Server 2014.

As a Sanity check. I only created one Package to import one Table to MSSQL Server to try out. The connection to the InterSystems Cache Database was successful. The DSN for the InterSystems Cache Database is created in the System for 32 and 64 Bit.

6
0 2167
Question Scott Hawkins · Oct 30, 2018

Hello,

I have been trying to pull data through a linked server in SSMS from an InterSystems Cache Database for a while, this is to enable us to join the data to other source systems in our Data Warehouse.

I have set up an ODBC connection and a linked server to the database and can execute queries through OPENQUERY in Management studio, but the data is huge (> 100million rows). So when I execute a SQL query with a WHERE clause the query just spins.

2
0 976
Question Alan Howatt · Sep 14, 2018

We are go to set up an odbc connection using data direct odbc on a linux redhat install, x86_64 gnu

I have downloaded the ODBC-2017.2.2.865.0-lnxrhx86.tar.gz and now need to set up the entry in the odbc

Problem is, what .so do I use??

./bin/cconnect.so
./bin/libodbc.so
./bin/libcacheodbcu.so
./bin/cgateu.so
./bin/libcacheodbciw.so
./bin/libcacheodbc35.so
./bin/libcacheodbcuw.so
./bin/libiodbc.so
./bin/libcacheodbcuw35.so
./bin/cgateiw.so
./bin/libcacheodbcu35.so
./bin/libcacheodbc.so
./bin/cgate.so
./bin/libcacheodbciw35.so
./bin/libcachedb.so
./dev/odbc/redist/unixodbc/libodbcinst.so


thanks

3
0 2512
Question Mark Anthony Manalo · Aug 2, 2018

Hello everyone,

Im just wondering if there is any possibility to "Listen" to a cache DB? We have our cache DB somewhere else provided by a different company, we are provided the interface to connect to that cache DB so we can extract the cache DB every night.

Im just curious if theres a way to "listen" to the cache DB, so if theres any changes on the table in the cache DB, I could make a trigger to extract the table again.

I know i could just set my ETL every hour or so... but that would extract all the tables in cache DB.

Thanks a lot for any help and information.

Kind regards,

mark

9
0 888
Question Graham Hartley · May 10, 2018

I  have generated a class using the linked procedure wizard however  I can't get it to work if the  datatype  of one of the parameters is VARCHAR(MAX).  It works fine if I change it to say VARCHAR(500) and  rerun the  stored procedure wizard. 

I get the following  error returned.:

ErrorMsg:   SQLState: (07002) NativeError: [0] Message: [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error

Can anyone see what I am doing wrong?  I think it is to do with the way I am using the  %Stream.GlobalCharacter?   Any help is much appreciated.

Class generated by linked procedure wizard:

12
0 1043