odbc

Running MSSQL Stored Procedures via ODBC (And getting the results back) with PHP

My work is in the process of moving all of our PHP web applications off of our Windows production web server to a new Linux server environment specifically for PHP apps. The sticky part is, several of the PHP applications we're running are using MSSQL databases, and therefore all the DB connectivity has to be re-written to use unixODBC/F...

Changes reflected in dataset, but NOT db

I'm trying to migrate from an Access db to a MySql and don't have much experience with the latter. I wrote some sample code to write data that works one way, but not another and I'm not seeing the difference. Basically, the way that WORKS connects to the MySql database, extracts a dataset, creates a new row of data, adds it to the datas...

Problem with ODBC.Net connection to MySQL DB

I'm thinking the problem here is with my SQL Syntax, but I'm not sure and need a fresh pair of eyes to check it out. This is the code I'm using to connect to and then insert into the DB: OdbcConnection datConn = CreateDataConn(); datConn.Open(); OdbcCommand comm = new OdbcCommand(); comm.CommandTex...

Encoding problems with dBase III .dbf files on different machines

Hello. I'm using C# and .NET 3.5, trying to import some data from old dbf files using ODBC with Microsoft dBase Driver. The dbf's are in dBase III format and using ibm850 encoding for strings. Now, when I run my program on my machine, all string data read from OdbcDataReader comes out converted to UTF-16 or UTF-8 or something, idk a...

Exception thrown when retrieving ODBC schema using .Net System.Data.ODBC

Our customer is using a driver by iWay Software to provide ODBC access to sequential files on a mainframe system. They are able to access the data successfully from Excel using the ODBC source but when we try to access the schema information using GetSchemaTable() on a successfully opened DbDataReader the following exception is thrown: ...

Persistent ODBC connection from Excel to Oracle view

Have excel set up to pull some count and sum information from a database view in oracle using ODBC. In my sheet I want to populate about 10 different fields in one sheet with the single result from different queries. It works except for one thing. Every time I open the file it asks for the database username and password 10 times. ...

ODBC API to retrieve UserDefinedType of a Column in SQLServer 2005/2008

Hi, I have read that the ODBC API "SQLDescribeCol" could be used to retrieve the SQLDataType of a column. Similarly, is there any ODBC API which could be used to retrieve UserDefinedType of a column? -Vengatesh ...

How to execute PostgreSQL funcion from VBA code?

How to execute funcion named Test1 that is stored in PostgreSQL from VBA code? For example. We have function definition as follow: CREATE OR REPLACE FUNCTION "public"."Test1" ( ) RETURNS bit AS $body$ BEGIN INSERT INTO test ("name") VALUES ('1'); RETURN 1; END; $body$ LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOK...

Getting syntax error when trying to use OPENQUERY

I am trying to do a query via ODBC to our ERP database. The documentation guide suggests that we use OPENQUERY to send the query. Here is my example query SELECT Q.Part_No, Q.[Description], Q.Part_Type FROM OPENQUERY ( LINKEDSERVER, ' SELECT P.Part_No, P.[Description], P.Part_Type FROM LINKEDSERVER...Part_V_Part AS P WHE...

Windows service won't stop and restart

I wrote a windows service in C++ that needs to restart every night at midnight, so I call exit(1) on it so that it can be restarted by SCM. The problem is it seems every other night it starts up partially and hangs. In the event log, I get this: Application popup -Application Error: The instruction at "0x0043c145" referenced memory a...

ODBC Oracle Connection error from MS Access

Hi Everyone- I currently support an MS Access database that has linked connections using the Microsoft ODBC Driver for Oracle. I can connect to the current linked tables without any issues, but we are required for security reasons to change the password on the account accessing the Server. I have changed the password successfully but...

PHP bind_param alternative for ODBC?

Greetings, I am developing an Admin Control panel and I have to use ODBC to connect to the Database. I'm used to using MySQLi so this is extremely awkward for me. I'm trying to make this as OOP as possible, so I'm using classes and prepared statements. I need to know if there is an ODBC alternative to bind_param and how to use it? I'm...

iODBC does not work under Mac OSX 10.6.4

I've installed iODBC over the package (http://www.iodbc.org/dataspace/iodbc/wiki/iODBC/) and set up all config files as described here: http://blog.opensteam.net/past/2009/1/28/rails_ms_sql_on_mac/ I set up the same thing on a Linux machine and it worked fine. On my Mac OSX 10.6.4, I get this error if i test the connection: xxx@xxx:/op...

How can I connect to a Lotus Notes database (*.nsf) with Perl and DBI?

I've got a Perl/DBI program that needs to connect to a Lotus Notes database. With NotesSQL installed, the program works, but keeps prompting me for a Notes password. Is there any way to pass the Notes ID and password programmatically? I'm using ActiveState Perl 5.8.8, Notes 8.5, and NotesSQL 8.0. ...

DataAdapter returns a empty rowset, but DataReader returns data.

Hi, I execute a query that calls a SP, that SP returns data... but when I call it with a DataAdapter I get no result data, if use a DataReader instead... then I get data. The database is SQL Server and the code is using OleDb for reasons I cannot change. These two calls returns diferent things: String commandText = "Declare @retur...

PostgreSQL: Which connectivity uses psql tool of PostgreSQL

Does anybody know how psql accesses PostgreSQL database? What it uses odbc, jdbc or some native database library? ...

How to correct drivermanager.getconnection exception

I want know about how to correct driver connection exception. I got that exception as drivermanager.getconnection exception. Does any one know please answer me. I use ODBC Bridge connection and MS ACCESS Database. Class.forName("sun.jdbc.odbc.JdbcOdbc"); Connection con = DriverManager.getConnection("jdbc:odbc:mydb", "", ""); excepti...

Connecting to JDBC-ODBC using File DSN

When connecting to a DB using JDBC-ODBC Bridge (sun.jdbc.odbc.JdbcOdbcDriver), how should the URL be formatted if a File DSN is to be used? I'm using SquirreLSQL to connect with a File DSN stored on a network drive. It seems that JDBC-ODBC can't recognize the file. Or my URL could be wrong. It works when I use a system DSN. I've tried a...

Using Microsoft Access SQL operators in Python ODBC

Short version: When I try to use Access's DatePart function via ODBC, it cannot be resolved. Longer version: I have a Microsoft Access query which returns rows with a timestamp and a score. I want to sort it by day and then by score - effectively a high-score table for the day. For want of a better function, I used the DatePart funct...

is there a limit to the (CSV) filesize that a Python script can read/write?

I will be writing a little Python script tomorrow, to retrieve all the data from an old MS Access database into a CSV file first, and then after some data cleansing, munging etc, I will import the data into a mySQL database on Linux. I intend to use pyodbc to make a connection to the MS Access db. I will be running the initial script in...