odbc

Database query C# not working

荒凉一梦 提交于 2019-12-07 18:26:16
问题 I've read many ODBC tutorials for C# on the net, and this code is the only one that didn't give me error. But the problem is, it doesn't do anything -.- How to fix ?? using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; using System.Data.Odbc; using System.Data.Sql; namespace WindowsFormsApplication1 { static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { string

SSRS: Error while querying data from an Excel file (through ODBC)

喜夏-厌秋 提交于 2019-12-07 17:43:31
问题 I am trying to render a simple chart using SSRS . The data is in an Excel sheet. I have set up an user DSN and created a data source in SSRS using ODBC . I am able to query the excel in Data tab. However while trying to preview, I get the following error: error [hy000] [microsoft] [odbc excel driver] the connection for viewing your linked Microsoft Excel worksheet was lost. Anyone knows why this is happening and how this can be solved? 回答1: I would consider creating a SQL Sever Integration

How to write an Excel function which returns a value from an SQL database?

孤者浪人 提交于 2019-12-07 17:26:57
问题 I want to write the following function which should be used in an Excel worksheet: =GetRecField("Foo Record Key", "FooField1") ...which will connect internally through ODBC to an SQL database, execute there an SELECT FooField1 FROM MyTable WHERE KEY_FIELD='Foo Record Key'; and will return the resulting value as the result of the function GetRecField. The above SQL is granted to return only one record (IOW KEY_FIELD has an unique constraint). Of course, the above function can be called

MS-Oracle ODBC Driver Function Sequence Error

…衆ロ難τιáo~ 提交于 2019-12-07 17:07:34
问题 I'm using the Microsoft-Oracle ODBC Driver to access an Oracle database in MS Access, but on about half of my linked tables, I get a [Function Sequence Error] whenever I try to pull up the Datasheet view. I've looked around for alternative drivers, but no luck. Does anyone know how to stop getting these function sequence errors? And if I need a new driver, could you provide a link if possible to a download site? Thanks 回答1: I figured it out. The problem was that the Microsoft-Oracle ODBC

iODBC error trying to connect to MS SQL Server in PHP with unixODBC/FreeTDS

天大地大妈咪最大 提交于 2019-12-07 16:23:28
问题 I am trying to connect to a remote MS SQL Server db from PHP on Mac (eventually on an Ubuntu server( with FreeTDS and unixODBC, but even though I seem to have everything set up properly, I'm getting iODBC errors, and I'm not sure how to get around them. I'm using MacPorts, so my config is: /opt/local/etc/freetds.conf:: [bti_db] host = 123.45.67.89 (IP address changed to protect the innocent) port = 14333 tds version = 8.0 /opt/local/etc/odbcinst.ini: [FreeTDS] Description = TDS Driver (Sybase

Using an ODBC application with a JDBC driver

戏子无情 提交于 2019-12-07 12:58:04
问题 My company uses Vertica. We have Python applications that connect to it with pyodbc. I do most of my development on a Mac (Snow Leopard) and unfortunately Vertica has not released ODBC drivers for Mac. They do have JDBC drivers though. I don't think developing in Jython is a good compromise. Is there any way to use JDBC drivers with an ODBC application? Some kind of ODBC connector? 回答1: edit: update for vertica 5/6 can be found here https://github.com/serbaut/psycopg2 Here is a patch to make

SQL Server backend and Access frontend - ODBC Connection to SQL Server native client failed

跟風遠走 提交于 2019-12-07 12:46:14
问题 I have a SQL Server 2008 database as a back end and Access as a front end. Is it required to have SQL Server Management Studio installed for Access to connect to the SQL database. The SQL database is on a server not on my local machine. I just reconfigured my computer and have not installed SQL Server Management Studio yet. I was trying to open the database in Access but I get this error message saying: ODBC Connection to SQL Server Native Client10.0 " Server name " failed. So how can I get

Accessing Microsoft SQL Server from Windows in PERL

五迷三道 提交于 2019-12-07 12:25:24
问题 I am using SQL Server driver. But this is the following error I get: DBI connect('Driver={SQL Server}:$database:$host','cartertest',...) failed: [Microsoft][ODBC Driver Manager] Invalid connection string attribute (SQL-01S00) at PERL_SQL_Connect.pl line 15 Can't call method "disconnect" on an undefined value at PERL_SQL_Connect.pl line 16 This is my code: use DBI; use DBD::ODBC; #my $dsn = "dbi:SQL Server:$database:$host"; my $dsn = 'DBI:ODBC:Driver={SQL Server}:$database:$host'; my $host =

OdbcConnection Text Driver ignores scheme.ini settings

走远了吗. 提交于 2019-12-07 11:29:28
Here is my code: OdbcConnection conn = new OdbcConnection("Driver={Microsoft Text Driver (*.txt; *.csv)};DSN=scrapped.csv"); conn.Open(); OdbcCommand foo = new OdbcCommand(@"SELECT * FROM [scrapped.csv] WHERE KWOTA < 100.00", conn); IDataReader dr = foo.ExecuteReader(); StreamWriter asd = new StreamWriter("outfile.txt"); while (dr.Read()) { int cols = dr.GetSchemaTable().Rows.Count; for (int i = 0; i < cols; i++) { asd.Write(string.Format("{0};",dr[i].ToString())); } asd.WriteLine(); } asd.Flush(); asd.Close(); dr.Close(); conn.Close(); Here is my Scheme.ini [scrapped.csv] Format=Delimited(;)

SQL Server 2012 via native C++ (no ATL) preferred access method from Windows

末鹿安然 提交于 2019-12-07 11:13:32
问题 I have a native C++ application that runs under Windows 64, it doesn't use ATL (and will not). I want to be able to connect from my application to SQL Server 2012 over the network. I have the following requirements: Performance is the key The C++ will only insert records (say by calling Stored Procs), nothing else (no selects, deletes or updates). Record insertions should be non-blocking (async). I narrowed my choices down to OLE DB and ODBC as they satisfy the criteria above. However, it