odbc

SAS Date Formats Incompatible with SQL Server Date

筅森魡賤 提交于 2019-12-04 06:24:00
问题 I'm fairly new to SAS and recently we migrated some of our SAS datasets to a SQL Server table but we are still using SAS to do our analysis. I have run into a problem when SAS is trying to bring in the data from the SQL Server table and have SAS check if the srv_edt date is between the SAS dates of dos_beg_dt1 and dos_end_dt1. When SAS tries to compare the dates I get an error of: ERROR: WHERE clause operator requires compatible variables. The dos_beg_dt1, dos_end_dt1, and srv_edt (SQL date

Laravel: PDO Exception, cannot find driver even though the driver is installed and tested [duplicate]

耗尽温柔 提交于 2019-12-04 06:08:27
This question already has answers here : Closed 3 years ago . How to use SQL Server connection in Laravel? (4 answers) I'm working on a Laravel 5.1 project that has to connect to an existing MS SQL Server database. My project is currently on a Ubuntu 16.04 LTS server using Apache 2.4.18. I've installed the Microsoft ODBC Linux driver for SQL Server (version 13.0.0.0) on the machine and tested it manually with the sqlcmd command: sqlcmd -S DatabaseIPAddress -U DatabaseUsername It all worked fine. I can log on to the database no problem. When I go to migrate my database with php artisan however,

How do I get a list of available tables from an ODBC connection?

≯℡__Kan透↙ 提交于 2019-12-04 05:34:05
In Excel I can go to Data -> Import External Data -> Import Data... and then select the data source to use and then after I provide login information it gives me a list of tables. I would like to know how to get that list programmatically using C#. Krip What type of data source are you interrogating? SQL Server? Access? Look at this thread: http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/bcf25d16-3ecd-427d-9ad2-57619d6b3691 Also documentation for the OdbcConnection.GetSchema Method here: http://msdn.microsoft.com/en-us/library/system.data.odbc.odbcconnection.getschema.aspx

How to import an Excel file into MySQL using ODBC in Java?

好久不见. 提交于 2019-12-04 05:25:15
问题 I want to import an Excel file into a MySQL database using an ODBC driver. Does Java support this technique? If yes, please guide me on how to implement this. 回答1: You can read an Excel file in Java using the Apache POI library: http://poi.apache.org/ There are some code samples on their howto page which will tell you how to read an Excel file: http://poi.apache.org/spreadsheet/how-to.html To store the data it would be better for you to use the JDBC driver for MySQL rather than ODBC since

How can I create an ODBC connection to SAS?

痞子三分冷 提交于 2019-12-04 04:57:36
I'm writing a program that needs to access SAS data. I've downloaded the ODBC drivers for SAS and installed them, but I need to be able to create ODBC connections on the fly, programmatically. The following code (in Python) seems like it should work: import ctypes ODBC_ADD_DSN = 1 def add_dsn(name, driver, **kw): nul, attrib = chr(0), [] kw['DSN'] = name for attr, val in kw.iteritems(): attrib.append('%s=%s' % (attr, val)) return ctypes.windll.ODBCCP32.SQLConfigDataSource(0, ODBC_ADD_DSN, driver, nul.join(attrib)) == 1 print add_dsn('SAS Test', 'SAS', description = 'Testing SAS') But it pops

Unable to connect to SQL Server 2008 using ODBC connection via system dsn on windows 2012

空扰寡人 提交于 2019-12-04 04:19:13
I have Windows 2012 server and I am able to connect to a SQL Server 2008 instance through Visual Studio Server Explorer by creating a data connection. I can also use SQL Server Management Studio and connect to that SQL Server. But for some reason when I try to connect using the ODBC Data Source Administrator to set up a DSN I get the following error. Connection Failed: SQLState: '01000' SQL Error: 1 [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (SECCreateCredentials()). Connection failed: SQLState: '08001' SQL Error: 18 [Microsoft][ODBC SQL Server Driver][DBNETLIB]SSL Security

Connect rails application to SQL Server 2005 from Windows

◇◆丶佛笑我妖孽 提交于 2019-12-04 04:15:19
I (sadly) have to deploy a rails application on Windows XP which has to connect to Microsoft SQL Server 2005 . Surfing in the web there are a lot of hits for connect from Linux to SQL Server, but cannot find out how to do it from Windows. Basically I followed these steps: Install dbi gem Install activerecord-sql-server-adapter gem My database.yml now looks like this: development: adapter: sqlserver mode: odbc dsn: test_dj host: HOSTNAME\SQLEXPRESS database: test_dj username: guest password: guest But I'm unable to connect it. When I run rake db:migrate I get IM002 (0) [Microsoft][ODBC Driver

64-bit Java can't access 32-bit MS Access database via ODBC

﹥>﹥吖頭↗ 提交于 2019-12-04 04:02:44
I've got a new 64-bit laptop and have installed STS 64-bit and Java 64-bit. I'm trying to create an ODBC connection to a 32-bi Microsoft database; however the default Admin tools don't provide a driver for access. After googling around, I saw that there's an admin tool for creating 32-bit drivers located in C:\Windows\SysWOW64\odbcad32.exe. However, an ODBC connection created from that that gives me an error message indicating an architecture mismatch when I run the program: "[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application

Odbc connection string format, not finding files

孤者浪人 提交于 2019-12-04 03:36:16
问题 This is kind of a 'double' question that might have a single answer. I'm working with an Odbc Connection with an AS/400, with my connection string as follows: driver={iSeries Access ODBC Driver}; system={0}; uid={1}; pwd={2}; DefaultLibraries=*USRLIBL; I'm able to connect to the system fine. *USRLIBL contains all the necessary libraries from the user (which is of the type 'API only' which has access to all user libraries). However, when I try to access certain ERP libraries, it says they can

python使用pyodbc,freetds连接azure数据库

倖福魔咒の 提交于 2019-12-04 03:00:31
简介: 微软azure平台推出sqldatabase paas服务。现在使用python语言连接azure数据库的小demo。 准备环境: 1,azure sqldatebase数据库创建,参考 http://www.windowsazure.cn/starter-guide/ 第三课,创建云端的数据库, 2,创建demo表,我是使用管理工具创建,sql语句代码为: IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[demo1]') AND type in (N'U')) BEGIN CREATE TABLE [dbo].[demo1]( id [int] IDENTITY(1,1) NOT NULL, name varchar(30) not null CONSTRAINT [PK_demo] PRIMARY KEY CLUSTERED ( [id] ASC )WITH (IGNORE_DUP_KEY = OFF) ) END; GO 需要注意的事项为:sqldatabase必须有一列为聚合键,如果没有,创建表会失败,临时表没有该限制。 可以参考 http://azure.microsoft.com/en-us/documentation/articles/data