odbc

Connecting to MS Access 2007 using ODBC_CONNECT - error in driver?

好久不见. 提交于 2019-12-01 06:36:25
问题 I have been successful in querying a Microsoft Access 2003 database (.mdb file) and now I am trying to do the same for a Microsft Access 2007. I have tried the following: if($type[1]=='accdb'){ echo 'accdb'; //2007 Microsoft Access $connection = odbc_connect("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=$mdbFilename;Persist Security Info=False;", $username, $password); }else{ echo 'mdb'; //2000, 2003 Microsoft Access $connection = odbc_connect("Driver={Microsoft Access Driver (*.mdb)};Dbq=

simple remote ODBC database connection with ruby

╄→гoц情女王★ 提交于 2019-12-01 06:30:54
I am attempting to make a simple connection to a remote database. I can not seem to get it to work. remote_db = DBI.connect('DBI:ODBC:remote-host','user','password') remote_db.table { |table| pp table } Any help would be greatly appreciated. sean lynch I think what you are looking for is Ruby DBI. http://ruby-dbi.rubyforge.org/ Here is an example of using DBI for ODBC connectivity: # Require in the DBI files<br /> require 'DBI' # create an ODBC connection instance<br /> dbi_conn = DBI.connect('DBI:ODBC:datasource','your_username','your_password') # query tables available <br /> dbi_conn.tables

Install An ODBC connection from cmd line

筅森魡賤 提交于 2019-12-01 06:19:07
问题 Install An ODBC connection from cmd line Hi, i want to install an odbc connection threw the cmd line, in this cmd below i can open only a name and driver of the database i want to use. i need to add also a ip,user,password,description. odbcconf configsysdsn "MySQL ODBC 5.2w Driver" "DSN=test1|SERVER=(local)" 回答1: ok, figured out! odbcconf configsysdsn "MySQL ODBC 5.2w Driver" "DSN=test;SERVER=127.0.0.1;PORT=3306;DATABASE=mdb;UID=root " 来源: https://stackoverflow.com/questions/13433371/install

How can I save a DataTable to a .DBF?

99封情书 提交于 2019-12-01 05:43:26
问题 I've been working on a program to read a dbf file, mess around with the data, and save it back to dbf. The problem that I am having is specifically to do with the writing portion. private const string constring = "Driver={Microsoft dBASE Driver (*.dbf)};" + "SourceType=DBF;" + "DriverID=277;" + "Data Source=¿;" + "Extended Properties=dBASE IV;"; private const string qrystring = "SELECT * FROM [¿]"; public static DataTable loadDBF(string location) { string filename = ConvertLongPathToShort

Binding int64 (SQL_BIGINT) as query parameter causes error during execution in Oracle 10g ODBC

大城市里の小女人 提交于 2019-12-01 05:40:23
问题 I've got an insert into a table using ODBC 3.0 on Oracle 10g that is failing and I have no idea why. The database is on Windows Server 2003. The client is on Windows XP. The table: CREATE TABLE test ( testcol NUMBER(20,0) NULL ); The ODBC calls: SQLAllocHandle(SQL_HANDLE_STMT) = SQL_SUCCESS SQLPrepare(INSERT INTO test (testcol) VALUES (?);) = SQL_SUCCESS SQLINTEGER nStrLen = 0; __int64 nInt64 = 99; SQLBindParameter(hStatement, 1, SQL_PARAM_INPUT, SQL_C_SBIGINT, SQL_BIGINT, 20, 0, &nInt64, 0,

Django <-> SQL Server 2005, text encoding problem

痞子三分冷 提交于 2019-12-01 05:38:21
I'm trying to store Django data on MS SQL Server 2005 using: http://code.google.com/p/django-pyodbc/ (pyodbc + FreeTDS) As long as I'm storing string consist of ASCII characters everything is ok. When I'm using unicode (ex. '\xc5\x82'), django throws ProgrammingError on: ProgrammingError at /admin/cli/punktrejestracji/add/ ('42000', '[42000] [FreeTDS][SQL Server]The incoming tabular data stream (TDS) protocol stream is incorrect. The stream ended unexpectedly. (4002) (SQLExecDirectW)') last element of trace is: params ('\xc5\x82',) self <django.db.backends.sql_server.pyodbc.base.CursorWrapper

PHP 7.0 ODBC-Driver for Windows

与世无争的帅哥 提交于 2019-12-01 05:22:22
问题 I upgraded my PHP 5.6.30 (https://www.apachefriends.org/de/download.html) to PHP 7.0 (https://bitnami.com/stack/wamp/installer) Everything worked fine so far and it reduces the loading time from my Page from 1,2 seconds to ~300 ms, when I use a MySQL-Database. But now I'm trying to connect to a MSSQL-Database with the following simple script, that worked fine with my old installation (PHP 5.6): <?php //Use the machine name and instance if multiple instances are used $server = 'Server-Adress';

How to retrieve a very long XML-string from an SQL database with R?

℡╲_俬逩灬. 提交于 2019-12-01 05:06:30
问题 I have a script to get an XML file from an SQL database. Here is how I do this: library(RODBC) library(XML) myconn <- odbcConnect("mydsn") query.text <- "SELECT xmlfield FROM db WHERE id = 12345" doc <- sqlQuery(myconn, query.text, stringsAsFactors=FALSE) doc <- iconv(doc[1,1], from="latin1", to="UTF-8") doc <- xmlInternalTreeParse(doc, encoding="UTF-8") However, the parsing didn't work for a particular database row, although it worked when I copied the content of this field into a separate

How to Get The Count or The Number Of Rows In A Result Set In PHP using ODBC Connection?

自作多情 提交于 2019-12-01 04:16:39
问题 While I build a web page in My PHP web application, My Connection works ok but When I want to get the count of rows of the SELECT Statement I used in my query, It gives me -1 !! although my result set has about 10 rows. I would like to get the actual number of result set rows. I searched the PHP Manual & documentation but I do not find a direct way like a Count function or something like that. I wonder if I have to make a Count(*) SQL Statement in another query and attach it to my Connection

With VBA, find the version of the the MySQL ODBC driver installed in Windows

你说的曾经没有我的故事 提交于 2019-12-01 04:11:47
Using Visual Basic for Applications , how can I find out which version of the MySQL ODBC driver is installed in Windows on a user's machine? I have a Microsoft Access application that uses the MySQL ODBC driver to make a connection. The connection string looks like this: ODBC;DATABASE=mydatabase;DRIVER={MySQL ODBC 3.51 Driver}; OPTION=3;PWD=password;PORT=3306;SERVER=server-db;UID=db-user; This was working find until the IT manager installed version 5.1 of the MySQL ODBC driver on a user's PC, which broke my connection string. If I knew the version of the driver installed on the user's Windows