odbc

ODBC or OleDB database drivers under Azure App Service

自古美人都是妖i 提交于 2019-12-02 04:54:02
问题 I'm investigating what's involved in deploying an ASP.NET MVC web application to Azure as an App Service, using Web Deploy from Visual Studio 2015. The MVC web application uses SQL Server for the identity database in the standard fashion, so I can see how to point that at an Azure-hosted database server. In addition, it has some 'legacy' data in DBF files in the App_Data folder, accessed on my development PC via OLEDB. This scenario is obviously going to fail on deployment because whatever

Running asynchronous query in MS Access

落花浮王杯 提交于 2019-12-02 04:37:16
I'm trying to run some heavy queries asynchronously, but can't figure out how to do it for an .mdb file. This is what I have so far: Dim wrksp As Workspace, qdf As QueryDef, rst As Recordset Dim cnn As Connection, strConnect As String Set wrksp = CreateWorkspace("ODBCDirect", "Admin", "", dbUseODBC) strConnect = "ODBC;Driver={Microsoft Access Driver (*.mdb)};Database=F:\Databank\webshop_ingrid.mde;Uid=;Pwd=;" Set cnn = wrksp.OpenConnection("", dbDriverNoPrompt, False, _ strConnect) Dim rs As Recordset Dim strQuery As String strQuery = "UPDATE ((((((tblSkuActueel LEFT JOIN

SQLSTATE[HY010]: Function sequence error: 0 during insert

狂风中的少年 提交于 2019-12-02 04:35:16
The problem During a very simple insert query, using PDO with an ODBC driver for a DB2 database, the driver returns the following error: SQLSTATE[HY010]: Function sequence error: 0 [Microsoft][Driver Manager ODBC] [italian message translation] (SQLExecute[0] at ext\pdo_odbc\odbc_stmt.c:254) The query itself is a prepared statement insert, with strings and dates. [italian message translation] just says "Function sequence error" in italian. The research This SO question reports the same problem, but occurred during a SELECT query, which is not my case This PHP bug report reports the same problem

Using ADO in VBA to connect to PostgreSQL

北城余情 提交于 2019-12-02 04:34:30
I am having trouble finding clear and reliable examples of connecting to a PostgreSQL database from Excel using VBA ADO. Admittedly, I am new to VBA and most examples and tutorials are very Access or MSSQL centered. (I work mostly in Ruby, Rails, Perl and PostgreSQL.) I am looking for code to connect and return a simple query (SELECT * FROM customers;) to an Excel sheet. Connection parameters (server ip, user, pass, database) are located within cells in a separate worksheet. I appreciate your help and patience. Code: Sub ConnectDatabaseTest() Dim cnn As ADODB.connection Dim cmd As ADODB

stata odbc sqlfile

可紊 提交于 2019-12-02 04:17:26
I am trying to load data from database (either MS Access or SQL server) using odbc sqlfile it seems that the code is running with any error but I am not getting data. I am using the following code odbc sqlfile("sqlcode.sql"),dsn("mysqlodbcdata") . Note that sqlcode.sql contains just sql statement with SELECT . The thing is that the same sql code is giving data with odbc load,exec(sqlstmt) dsn("mysqlodbcdata") . Can anyone suggest how can I use odbc sqlfile to import data? This would be a great help for me. Thanks Joy sqlfile doesn't load any data. It just executes (and displays the results

Call Oracle package function using Odbc from C#

て烟熏妆下的殇ゞ 提交于 2019-12-02 04:01:32
I have a function defined inside an Oracle package: CREATE OR REPLACE PACKAGE BODY TESTUSER.TESTPKG as FUNCTION testfunc(n IN NUMBER) RETURN NUMBER as begin return n + 1; end testfunc; end testpkg; / How can I call it from C# using Odbc? I tried the following: using System; using System.Data; using System.Data.Odbc; class Program { static void Main(string[] args) { using (OdbcConnection connection = new OdbcConnection("DSN=testdb;UID=testuser;PWD=testpwd")) { connection.Open(); OdbcCommand command = new OdbcCommand("TESTUSER.TESTPKG.testfunc", connection); command.CommandType = System.Data

“[Microsoft][ODBC Driver Manager] Invalid string or buffer length” error

此生再无相见时 提交于 2019-12-02 03:30:32
问题 When I run in eclipse it runs fine. But, through the command prompt, it throws the exception "[Microsoft][ODBC Driver Manager] Invalid string or buffer length" . How to get over this? This is my code: public static Connection getConnection(){ try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String url = "jdbc:odbc:cabrouterds"; con = DriverManager.getConnection(url, "", ""); } catch(Exception e) { System.out.println("SQL Connection Exception: "+e.getMessage()); } return con; } 回答1: I'm

“[Microsoft][ODBC Driver Manager] Invalid string or buffer length” error

不问归期 提交于 2019-12-02 01:48:23
When I run in eclipse it runs fine. But, through the command prompt, it throws the exception "[Microsoft][ODBC Driver Manager] Invalid string or buffer length" . How to get over this? This is my code: public static Connection getConnection(){ try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String url = "jdbc:odbc:cabrouterds"; con = DriverManager.getConnection(url, "", ""); } catch(Exception e) { System.out.println("SQL Connection Exception: "+e.getMessage()); } return con; } bmusical I'm not sure why it didn't work. Probable guess would be compatibility issues between 64 bit windows 7

A column insert or update conflicts with a rule imposed by a previous CREATE RULE statement

风流意气都作罢 提交于 2019-12-02 01:08:18
问题 I'm working on a online game. I got some problems with inserting new data to table. I'm getting 2010-4-8 2:14, 37000, 513, [Microsoft][ODBC SQL Server Driver][SQL Server]A column insert or update conflicts with a rule imposed by a previous CREATE RULE statement. The statement was terminated. The conflict occurred in database 'KN_online', table 'ACCOUNT_CHAR', column 'strAccountID'., 261 NationSelect in logs. What does this means? How can i fix this? I've tried to delete RULE for my DB but I'm

Connecting Excel VBA to oracle DB using 'ODBC'

不打扰是莪最后的温柔 提交于 2019-12-02 01:02:39
Basically i work in a software company. My client has a Oracle database. I do access that database through SQL Developer.We have a virtual desktop too -inside which we have all client applications,SQL Plus etc..!! Now one other person in my team has created a excel macro in which if you give your username password and your SQL query, it will connect to the oracle database and fetch the records for you and will save it in an excel sheet in the virtual desktop itself. Now i want to do something similar but i am not able to fins how i connect my excel VBA to Database. As his macro is able to