odbc

Derby Database ODBC Connection

本小妞迷上赌 提交于 2019-11-28 11:18:39
问题 I have a Derby Database in Netbeans with connection string jdbc:derby://localhost:1527/MyDatabase Can this be used with ODBC? If so, how could I transform this or configure my Derby Database to be compliant with ODBC The end goal is to get the Derby Database migrated to MySQL. Using the migrating wizard in MySQL Workbench appears to be the easiest way. However I do need ODBC connectivity. 回答1: Do you want to use ODBC because MySQL Workbench uses it to migrate database? I migrated some

Can ODBC parameter place holders be named?

ⅰ亾dé卋堺 提交于 2019-11-28 10:58:19
I did some searching and haven't found a definitive answer to my questions. Is there a way to define which ? in a SQL query belongs to which parameter? For example, I need to perform something like this: SELECT * FROM myTable WHERE myField = @Param1 OR myField2 = @Param1 OR myField1 = @Param2 OR myField2 = @Param2 The same query in ODBC is: SELECT * FROM myTable WHERE myField = ? or myField2 = ? or myField1 = ? or myField2 = ? Is there a way to tell the ODBC command which parameter is which besides loading parameters in twice for each value? I suspect there isn't but could use perspective from

PDO_ODBC: Data source name not found and no default driver specified

随声附和 提交于 2019-11-28 10:12:53
问题 I'm trying to access an ODBC connection in PHP via PDO_ODBC. This is my code: $db = new PDO('odbc:MyDSN', '', ''); And I'm getting this error: SQLSTATE[IM002] SQLConnect: 0 [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified I know the DSN is working because I can use it in Python with pyodbc. The type is User DSN - does it need to be a System DSN? I'm not specifying a driver because I figured ODBC was abstracting that away, but maybe I need to? The

Reading columns out of order returns incorrect values (SQL Server ODBC driver)

纵然是瞬间 提交于 2019-11-28 08:50:54
问题 This question is part in a series of bugs in the Microsoft ODBC driver: ODBC driver fails to raise errors; but instead suppresses them Reading columns out of order returns incorrect results Cannot execute a stored procedure that is a SYNONYM Microsoft has said they will not be fixing these bugs in their ODBC driver. Short Version If i read uniqueidentifier values in SELECT order, i am returned the correct values: ColumnB : (read valid value) ColumnC (read valid value) If i read

Creating a DSN-less connection for MS Access within Java

做~自己de王妃 提交于 2019-11-28 08:46:15
I'm building a desktop app that needs to communicate with a MS Access database. Now, unless I want to register the DSN for the database on every computer that's going to use the desktop app, I need a way to connect to the database in a DSN-less fashion. I've searched alot and found some useful links on how to create connection strings and based on that I tried modifying my program based on that but without success. The code below fails. If i switch the string in the getConnection to "jdbc:odbc:sampleDB" it works, but that's using DSN and not what I want to achieve. How do I write and use a

How to create a .dbf file using c#?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-28 08:19:44
问题 I am trying this to make a select and it works just fine string str = "SELECT * FROM FREE RIGHT JOIN TestTest ON FREE.DOCNO = TestTest.DOCNO"; DataTable dt = new DataTable(); OdbcDataAdapter da = new OdbcDataAdapter(str, odbconn); da.Fill(dt); I am trying this to create a .dbf and i get this OdbcException : string str0 = "Create Table Persons (Name char(50), City char(50), Phone char(20), Zip decimal(5))"; OdbcCommand cmd = new OdbcCommand(str0, odbconn); cmd.ExecuteNonQuery(); ERROR [42000]

How to bind ISO8601 TSQL DATETIME parameter with PDO?

一笑奈何 提交于 2019-11-28 08:08:38
问题 It seems that PDO has a problem with ISO 8601 formatted timestamps. I'm connecting from 64-bit Ubuntu 16.04 running PHP 7.0.8 using the Microsoft® ODBC Driver 13 (Preview) for SQL Server® Here's my simple table: CREATE TABLE dtest ( "stamp" DATETIME ); Works: $pdoDB = new PDO('odbc:Driver=ODBC Driver 13 for SQL Server; Server='.DATABASE_SERVER.'; Database='.DATABASE_NAME, DATABASE_USERNAME, DATABASE_PASSWORD ); $pdoDB->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); $sql = "INSERT

Java ODBC Data Source ( undefined symbol: SQLAllocEnv )

為{幸葍}努か 提交于 2019-11-28 08:02:38
问题 I have the following Java code. Purpose of this code is to establish a connection to a remote MySQL database ProductionDb ( a data source defined in my /etc/odbc.ini file ). import java.sql.*; import java.util.*; import java.io.*; public class Test { public static void main(String[] args) { try { Connection conn = null; PreparedStatement s = null; String driver = "sun.jdbc.odbc.JdbcOdbcDriver"; Class.forName(driver).newInstance(); conn = DriverManager.getConnection("jdbc:odbc:ProductionDb");

JDBC driver MS Access connection

旧巷老猫 提交于 2019-11-28 07:47:52
I want connect my MS access file with Java GUI program,but I have problem with connection.... I have Windows 7 64b, and ms office 2007. When I opened the ODBC driver manager in the control panel I havent found any driver for Microsoft Access (maybe when I started the ODBC is started running the 64bit ODBC, now I think is running the 32bit ODBC. I read this and I make it : "jdbc-odbc connection for window 7 64 bit machine.. 1 . Right click Data source (ODBC)..go to properties change the folloing thing target [ %SystemRoot%\SysWOW64\odbcad32.exe ] start in : [ %SystemRoot%\System32 ] press enter

Encoding problems with dBase III .dbf files on different machines

别等时光非礼了梦想. 提交于 2019-11-28 07:04:13
问题 I'm using C# and .NET 3.5, trying to import some data from old dbf files using ODBC with Microsoft dBase Driver. The dbf's are in dBase III format and using ibm850 encoding for strings. Now, when I run my program on my machine, all string data read from OdbcDataReader comes out converted to UTF-16 or UTF-8 or something, idk and I save it as UTF-8 and everything is ok, but when I try to use this program on an XP box, some characters aren't converted correctly to UTF-8. 'Õ' for example. There