odbc

Querying database schema of SQL Server DB via ODBC?

眉间皱痕 提交于 2019-12-22 17:58:52
问题 Is there a generic way to retrieve a database schema using ODBC that works across databases? If not, what is the easiest way to do this when the database server is MS SQL Server? I am working with unixodbc, from Linux. 回答1: Query against the INFORMATION_SCHEMA views. Beautiful thing about using information schema is that it's a standard so it should be portable to any database that has implemented the standard. e.g. SELECT * FROM INFORMATION_SCHEMA.COLUMNS ISC The standard is the SQL-92

Database trigger that communicates with an external program

天大地大妈咪最大 提交于 2019-12-22 12:02:14
问题 I've got a SQLServer Database and an application (.NET) that configures data on that database. On the other hand, I've got an application (VC++) that reads that data from the database and must be 'informed' a soon as possible of any change in the data saved on the database. I would like to receive a signal from the database engine when some data had been changed by the first app. Of course, I can code some kind of message that comunicates both apps but my question is if exists that mechanism

Check for System DSN and create System DSN if NOT Existing (iSeries Access ODBC Driver)

风流意气都作罢 提交于 2019-12-22 11:28:09
问题 can someone please help me with this? i need to check through the System DSN for my ODBC connection to the AS400 servier and create a System DSN if a particular one does not exist. i've tried googling and have not been able to find anything good for me. btw, i am quite new to programming. any help will be much appreciated. thank you 回答1: After going through the few less complicated examples available online, this is what i managed to come up with (and it works fine for me). using System;

How to load ODBC in qt

a 夏天 提交于 2019-12-22 10:13:48
问题 I'm very new to Qt and C++ I'm trying to connect to an ODBC db, but I'm getting the following output QSqlDatabase: QODBC driver not loaded QSqlDatabase: available drivers: QSQLITE How do I load ODBC in Qt . CODE : QString serverName = "LOCALHOST\\SQLEXPRESS"; QString dbName = "test"; QSqlDatabase db = QSqlDatabase::addDatabase("QODBC"); db.setConnectionOptions(); QString myCon = QString("DRIVER={SQL Native Client};SERVER=%1;DATABASE=%2;Trusted_Connection = Yes").arg(serverName).arg(dbName);

Is it possible to use (fluent)nhibernate with an odbc connection?

旧时模样 提交于 2019-12-22 08:34:51
问题 i have to use a custom odbc driver. All i need to pass as a connection string is the DSN. How do i do this with (fluent)nhibernate? FluentNHibernate.Cfg.Db does only offer a OdbcConnectionStringBuilder class with an DSN method. How do i use this? 回答1: You can create your own OdbcConfiguration class that derives from PersistenceConfiguration . Depending on your database, you will have to replace the Dialect in the following class. public class OdbcConfiguration : PersistenceConfiguration

Adding ODBC to MAMP

人走茶凉 提交于 2019-12-22 08:33:26
问题 I've spent the last couple days trying to get ODBC installed and I am about to lose my mind, I'm way out of my element here. Please can some one help me before I fall to pieces. Here's what I'm trying: 1) Download 1.7.2 source code package found here (I'm using 1.7.2): http://www.mamp.info/en/downloads/index.html 2) CD into the php directory. 3) Run "/configure --with-iodbc=shared" 4) Run "make" 5) Copy the ./modules/odbc.so file into MAMP/bin/PHP5/lib/php/extensions/no-debug-non-zts-20050922

sqlquery in R does not return all rows from query

末鹿安然 提交于 2019-12-22 07:24:10
问题 I am executing below commands in R: dbhandle <- odbcDriverConnect('driver={SQL Server};server=serveripaddress;database=DBName;uid=sa;pwd=pwd;') FactActivity <- sqlQuery(dbhandle, "SELECT DimCourseID,DimPatientID FROM DWH.FactActivity", as.is=TRUE) nrow(FactActivity) In my database I have total 238634 rows but in R I am getting total rows = 237652 . This is happening for all tables (I tried it for three tables). Any idea what am I missing which is reducing no of rows in my resultset in R? 回答1:

C# Open DBF file

匆匆过客 提交于 2019-12-22 04:46:21
问题 I'm having a problem opening a DBF file - I need to open it, read everything and process it. I tried several solutions (ODBC/OLEDB), several connection string, but nothing worked so far. The problem is, when I execute the SQL command to get everything from the file, nothing gets returned - no rows. What's even more odd, the content of the DBF file being opened get deleted. See the code I have: public override bool OpenFile(string fileName, string subFileName = "") { OleDbConnection con = new

Efficient way to test ODBC connection

纵饮孤独 提交于 2019-12-22 04:00:48
问题 Our product is a TCP listening transaction processor. Incoming connections are assigned a thread to handle the connection and a DB connection to work with. Rather than costly approach of establishing new DB connection for each incoming client connection, we maintain a pool of database connections. The database connection pool fairly configurable: min / max sizes, growth rates, etc. Some details: Platform is Windows 2003 / 2008 R2 DB is SQL Server 2005 / 2008 R2 Connection method is ODBC

does pyodbc have any design advantages over pypyodbc?

戏子无情 提交于 2019-12-22 01:53:35
问题 I know pyodbc is an older project and probably more featureful and robust, but is there anything about its design (based on components of compiled C code), that would make it preferable to a pure Python implementation, such as pypyodbc? I do a lot of ETL work and am thinking of switching from a Linux/Jython/JDBC approach to Windows/Cygwin/Python/ODBC approach. 回答1: Potential advantages of pyodbc over pypyodbc by being written in C would be: speed - see the pypyodbc wiki comparison more