odbc

Cancelling odbc operation when taking too long

筅森魡賤 提交于 2019-12-11 23:27:57
问题 I am using ODBC to link some tables to a MySQL database hosted remotely. It's not a very good host, so it fails quite often. When this happens, it will hang Access (version 2003) for about 20 minutes, and then finally come up with an error (3146), saying that the connection unexpectedly closed. The only way I can get out of it is by End Tasking access. This can be frustrating, especially if I just wrote some code that wasn't saved yet. Is there a way to cancel the odbc operation, perhaps by

Encoding is not proper when query from Apache/PHP

走远了吗. 提交于 2019-12-11 23:02:50
问题 I have some problem with connection to my Vertica. I use PHP and PDO ODBC driver (thrue unixODBC). When I connect to Vertica via isql and select records from table all data are fine encoded - fields with UTF-8 (non ASCII symbols, for example cyrillic) correctly prints. If connect from web with PHP script and execute same query that fields has some unicode characters like this \u001A\u001A\u001A\u001A Each \u001A represent a one non ASCII symbol and can't be printed. I found that this problem

ODBC leaking memory in c# application

江枫思渺然 提交于 2019-12-11 21:26:53
问题 I've seem to have a memory leak. I found a post on stackoverflow recommending 'using' method but this doesn't seem to fix the issue. I am using Red Gate memory profiler which shows an increase in unmanaged memory constantly rising. This is the simple application I made to test: namespace TimerDebug { public partial class TimerDebug : ServiceBase { public TimerDebug() { InitializeComponent(); } protected override void OnStart(string[] args) { // Create Timer Timer MyTimer = new Timer(500);

trouble creating table with a field of type MEMO in Access db using perl/dbi/ODBC

冷暖自知 提交于 2019-12-11 21:11:19
问题 perl 5.8.9 Hello folks, I am successful in using DBI/DBD/ODBC to create a new table in an existing Access 2003 (.mdb) database with the following string: $q = "CREATE TABLE memoTestA (name TEXT, addr TEXT)"; # works but I can't figure out how to add a field of type MEMO ie $q = "CREATE TABLE memoTestB (name TEXT, addr TEXT, desc MEMO)"; # throws syntax error There must be a way - what is the trick? switching form using DBD::ODBC to Win32::OLE gets me past the "bad syntax" error thrown by the

Adding parameters to the WHERE clause of a SQL query

谁都会走 提交于 2019-12-11 19:47:35
问题 I'm using ADO.NET to connect to an Oracle DB through ODBC. Everything is working fine, besides binding parameters with a simple SQL query: Connection.Open(); IDbCommand command = Connection.CreateCommand(); command.CommandText = "SELECT length FROM activity_type WHERE name = :name_of_activity"; var parameter = command.CreateParameter(); parameter.ParameterName = ":name_of_activity"; parameter.Value = "Short_break"; command.Parameters.Add(parameter); int result = Convert.ToInt32(command

ODBC connection returns only strings as data type

久未见 提交于 2019-12-11 19:43:14
问题 I'm currently working with PHP and MS Access. I have a simple table with different data types. The connection to the database works good but, if I do a var_dump to the query, I notice that all data type are all converted to strings. If I use the same database with ASP I got the data types correct. The problem seems to be only with PHP and the ODBC driver. Is there any way to get those values with their correct data type? Any help would be greatly appreciated. 回答1: While it is true that an

Unable to connect to database : Pyodbc

旧街凉风 提交于 2019-12-11 18:57:38
问题 I'm trying to connect to an MSSQL database from python on Linux . Whenever I try to connect to database through python . I get the following error : >>> import pyodbc >>> connection=pyodbc.connect('DRIVER={FreeTDS};SERVER=xx.xx.xxx.xxx;DATABASE=xxxxxxxxx;UID=xxxxx;PWD=xxxxxxx;') Traceback (most recent call last): File "<stdin>", line 1, in <module> pyodbc.Error: ('08001', '[08001] [unixODBC][FreeTDS][SQL Server]Unable to connect to data source (0) (SQLDriverConnect)') This is the output for

Python-Oracle connection issue with Pyodbc

爷,独闯天下 提交于 2019-12-11 18:56:32
问题 Tried to connect to the Oracle database using Pyodbc: try: db_connection = pyodbc.connect('DSN=OraDev; PWD=%s' % Key.dbKeys['password']) except pyodbc.Error, err: print >> debug_file, "Database connection failed: %s" %err sys.exit() and it keeps giving me this error message: '[IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application (0) (SQLDriverConnect) So I am wondering if the culprit is that I am not having the

PDO Query Database ODBC

╄→尐↘猪︶ㄣ 提交于 2019-12-11 17:50:55
问题 I'm on my way learning about PDO from phpro.org, and a little bit confuse. <?php try { $dbh = new PDO("odbc:Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\pdo-tutorial.mdb;Uid=Admin"); } catch (PDOException $e) { echo $e->getMessage(); } ?> What is Uid? and what value should I enter? And, about the query <?php try { $dbh = new PDO("odbc:Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\pdo-tutorial.mdb;Uid=Admin"); /*** echo a message saying we have connected ***/ echo 'Connected to database

OdbcException: ERROR [23000] [ma-3.0.3][5.7.12]Cannot add or update a child row: a foreign key constraint fails

Deadly 提交于 2019-12-11 17:37:42
问题 I am getting this error when using MariaDB Connector/ODBC with nHibernate to connect MySql database OdbcException: ERROR [23000] [ma-3.0.3][5.7.12]Cannot add or update a child row: a foreign key constraint fails ( database . ChildTable , CONSTRAINT FK_ChildTable_ParentTable FOREIGN KEY ( Id ) REFERENCES ParentTable ( Id )) We have 2 tables, parent and child. Both tables linked with foreign key relationship. The below nHibernate mapping file. <hibernate-mapping xmlns="urn:nhibernate-mapping-2