odbc

MDB access using php

亡梦爱人 提交于 2020-01-01 19:39:32
问题 I am having a little bit of trouble trying to write to a .mdb database from php. The database has a table called comments and it has 3 columns "id", "comment" and "by". The code I have is this. <?php $count =0; $db_path = "newsBlog.mdb"; $odbc_con = new COM("ADODB.Connection"); $constr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . $db_path . ";"; $odbc_con -> open($constr); $sql = "INSERT INTO [comments] VALUES (".$_POST['newsId'].",'".$_POST['comment']."', '".$_POST['by']."')"; echo

MDB access using php

夙愿已清 提交于 2020-01-01 19:39:06
问题 I am having a little bit of trouble trying to write to a .mdb database from php. The database has a table called comments and it has 3 columns "id", "comment" and "by". The code I have is this. <?php $count =0; $db_path = "newsBlog.mdb"; $odbc_con = new COM("ADODB.Connection"); $constr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . $db_path . ";"; $odbc_con -> open($constr); $sql = "INSERT INTO [comments] VALUES (".$_POST['newsId'].",'".$_POST['comment']."', '".$_POST['by']."')"; echo

Connect to MySQL directly from an iPad app (not via PHP, etc.)

喜你入骨 提交于 2020-01-01 16:37:49
问题 Before anyone has a chance: Yes, i know it's a bad idea. Please, don't give me a lecture on how i should use a web service instead. Thanks. So, how could this be done? I found this bit http://www.karlkraft.com/index.php/2010/09/17/mysql-for-iphone-and-osx/ and thought it might do the trick. I got a bunch of ARC error messages, cleaned those out and got this error at runtime: Detected an attempt to call a symbol in system libraries that is not present on the iPhone: pthread_cond_init$UNIX2003

How can I create an ODBC connection to SAS?

白昼怎懂夜的黑 提交于 2020-01-01 09:23:45
问题 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,

Architecture mismatch between 32-bit and 64-bit ODBC drivers

给你一囗甜甜゛ 提交于 2019-12-31 04:04:17
问题 I've read most of the discussion surrounding 32-bit/64-bit ODBC driver and application mismatches. I have implemented the suggestions in articles pertaining to the error message in my question, and still have not found success. I recently converted from Windows XP to Windows 8.1, and am trying to reestablish the database connections that I had in XP. I was using localhost with Active Server Pages (classic ASP) serving up data from a local MS Access database via a system DSN - everything was

How to set charset for MySQL in RODBC?

倖福魔咒の 提交于 2019-12-31 02:07:27
问题 I have a data with chinese characters as field names and data, I have imported them from xls to access 2007 and export them to ODBC. Then I use RODBC to read them in R, the field names is OK, but for the data, all of the chinese characters are shown as ? . I have read the RODBC manual and it said: If it is possible to set the DBMS or ODBC driver to communicate in the character set of the R session then this should be done. For example, MySQL can set the communication character set via SQL, e

Python with MS SQL - truncated output

家住魔仙堡 提交于 2019-12-30 23:07:04
问题 I try to connect to MSSQL DB with python from Linux box ( Python 2.7 , Ubuntu 11.04 ) . Output that I receive is truncated to 500 characters. Please, see script and configs below. How it could be resolved? The problem I suppose in ODBC driver or near it. The code (pyodbc, pymssql): conn = pymssql.connect(host='my_remote_host', user='ro_user', password='password', database='current', as_dict=True) cur = conn.cursor() cur.execute(sql) for i in cur: print i conn.close() cnxn = pyodbc.connect

Python with MS SQL - truncated output

烈酒焚心 提交于 2019-12-30 23:06:21
问题 I try to connect to MSSQL DB with python from Linux box ( Python 2.7 , Ubuntu 11.04 ) . Output that I receive is truncated to 500 characters. Please, see script and configs below. How it could be resolved? The problem I suppose in ODBC driver or near it. The code (pyodbc, pymssql): conn = pymssql.connect(host='my_remote_host', user='ro_user', password='password', database='current', as_dict=True) cur = conn.cursor() cur.execute(sql) for i in cur: print i conn.close() cnxn = pyodbc.connect

SAS connection to Teradata Database using Teradata ODBC

烂漫一生 提交于 2019-12-30 11:09:47
问题 I'm trying to connect to Teradata in SAS. I set up an teradata ODBC on the machine. The assumption currently for me is that using ODBC is the only way for me to access the database. And here is the syntax of my connection command: Libname Teradata ODBC dsn = 'dsnname' uid = 'uid' pwd = 'pwd'; results: Error: The ODBC engine cannot be found. Error: Error in the LIBNAME statement. It keeps saying that the ODBC engine cannot be found. I'm really confused now. Is there anything wrong with the

SAS connection to Teradata Database using Teradata ODBC

南楼画角 提交于 2019-12-30 11:08:24
问题 I'm trying to connect to Teradata in SAS. I set up an teradata ODBC on the machine. The assumption currently for me is that using ODBC is the only way for me to access the database. And here is the syntax of my connection command: Libname Teradata ODBC dsn = 'dsnname' uid = 'uid' pwd = 'pwd'; results: Error: The ODBC engine cannot be found. Error: Error in the LIBNAME statement. It keeps saying that the ODBC engine cannot be found. I'm really confused now. Is there anything wrong with the