odbc

C# app with Data.odbc doesnt work on different machine..what to include?

Hi, I have an app with the use of namespace data.odbc in order to work with MySQL. I have tried it on different PC, the app works but when the odbc object should work, it does nothing. I suppose something is missing - I thought its automatically included. I have looked into app files - all are included. I have tried Add reference but th...

Filemaker GetAs...How to display Container Field on webpage?

I have an ASP.Net application that needs to display an image that is stored in a Filemaker Container field. My query statement looks like: select GetAs(Image, 'JPG') from UA_Item_Pictures where "Stock Number"=33989 and ImageOrder=1 According to the documentation: The possible file types (case sensitive) you can retrieve from a contain...

Connecting to Oracle 10g with ODBC from Excel VBA

Hi, The following code works. the connection opens fine but recordset.recordCount always returns -1 when there is data in the table. ANd If I try to call any methods/properties on recordset it crashes Excel. Any ideas?? Thanks Sub GetData() Dim conn As New ADODB.connection Dim connString connString = "DSN=name;Uid=user;P...

CakePHP and connecting to MS Access db using Unixodbc

I'm trying to use an Acces (MDB) database from a CakePHP app. On a Windows machine this works fine. On a Linux machine using Unixodbc this doesn't work at all. The error is as follows: Warning (2): odbc_connect() [function.odbc-connect]: SQL error: [unixODBC][Driver anager]Data ource name not found, and no default driver specified, SQL ...

MS Access db over network share

I have a simple web site that needs to connect to an access database over a unc share. The server is a windows 2003 box running IIS 6. The connection is via ODBC. We're receiving an error message that says " ERROR [42000] [Microsoft][ODBC Microsoft Access Driver] Not a valid password. ERROR [IM006] [Microsoft][ODBC Driver Manager] Dri...

Placeholders using generic ODBC drivers

Currently, I'm peppering form submissions to account for single quotes & other garbage. $form_field_value= str_replace("'", "''", stripslashes($form_field_value)); It is to prep the value for insertion using: $insert_sql = "insert into table (field) values ('".$form_field_value."')"; odbc_exec($conn, $insert_sql); Essentially,...

(Probably) Simple SQL Server cursor question

I need to call two stored procedures in sequence via ODBC in PHP: #run stored procedure 1 $query = "Shipped_Not_Shipped_Rep ".$_GET['rep_id']; $result = odbc_exec($dbh, $query); odbc_result_all($result); #run stored procedure 2 $query = "Shipped_Not_Shipped_Account ".$_GET['account_id']; $result = odbc_exec($dbh, $query); odbc_result_a...

Update Array field in progress DB using ODBC

Dear All: I access the progress DB using ODBC in my C# program, and I need to update some fields,which are array data type. so how can I write my sql statement to do such things? I read some progress documentations,in which some methods were mentioned as bellow: update pub.sometable set arrayfield='X;X;X;X;X;X' where condition.... but ...

how to Sort out Mysql odbc connection strings stored in registry as plain text

Mysql odbc connection string is stored in the windows registry as plain text. So someone can find it and view my database. How can I sort out this security problem. thanks ...

Select uniques, and one of the doubles

I have a table with columns A, B and C. Column A might have duplicates. I need a query that will get me a resultset with unique values in column A, and I don't care which possible duplicate it takes. I don't know anything beforehand about the rest of the data. An example might be: A B C 1 8 8 1 7 7 2 10 10 In...

Tracking SQL Calls From MS Access to MySQL

I'm trying to 'see' the SQL statements that are sent from MS Access 2003 to MySQL via ODBC. I've tried ODBC Tracing, but it's painfully slow, producing very large log files which are very difficult to read. For example, and insert looked like this: "INSERT INTO `tracking` (`contract_id`,`bp_id`,`csi_1`,`csi_2a`,`csi_2b`,`csi_code`,`...

Add 2 extra columns to an excel file

LS, Since the Microsoft ODBC Excel Driver doesn't support ALTER TABLE/DELETE FROM(/UPDATE?) statements, I'm using alternative ways of getting the right data in the right place. I still have one problem with getting 2 columns added to an excel sheet. Someone told me to use: SELECT *, newcol1, newcol1 INTO newExternalSheet FROM thisShe...

Closing ODBC connection doesn't write Excel file

LS, Basically my code opens a connection to the Excel file, performs an UPDATE query, and closes the connection again. When I execute a SELECT on the file, and output it, it does reflect the updated data, but when I close the connection and send the file to the user, it doesn't have the data in it. It seems that the data is written af...

MySql / Odbc connection problem

I'm accessing a MySql database via ODBC. It normally works fine, but if the database is stopped and restarted I have to restart my application in order to reconnect to the database. The code for accessing the database is like this: OdbcConnection connection = new OdbcConnection(connectString); OdbcCommand command = conn...

Not your usual MySQL4 + ODBC connection issue...

I've got a problem with ODBC that has me stumped, and I can't find an answer anywhere that addresses my problem. Short version: I can't connect to my MySQL4 installation on Ubuntu Jaunty from my WinXP ODBC System DNS, even tho I can connect just fine using the command line client both on that particular machine and others. Huge amoun...

create mysql odbc connection through batch script

Hi, Is there anyway to create a System DSN enter for MYSQL database (windows OS), with silent installation of MySQL ODBC Drivers programatically either through batch script or any other language? If drivers installation is not possible , atleast automatic DSN entery would be helpful. Thanks, ...

T-SQL stored procedure returns null in code, but works in console

I have a stored procedure CREATE procedure [dbo].[get_unique_identifier] AS DECLARE @ret_val INT UPDATE seq SET @ret_val = id = id + 1 RETURN @ret_val that queries a table (seq) that has a single int column and single row, increments the value and then then returns it. Don't ask why I'm doing this, but in short, the idea is to simulat...

GUID primary keys and Access Front End

I have a SQL server database with several tables that have GUIDs for primary keys that are automatically generated by SQL newID default value. (I don't want to get into a debate on the pro's and cons of that, that is just how it has to be for now). I am trying to create a basic front end to that in Access (2010 - but the issue seems to ...

How to Inspect ODBC communication, to see the SQL being passed through?

Is there a tool for windows that we can use to inspect any SQL commands that go through a particular ODBC data source? ...

Quickbooks SQL dump Code from QODBC

Hello, I need to extract Quickbooks SQL structure to make a Diagram about the tables that I need to work with. Could this be possible ? I think QODC could solve my connection issue but I don't know how to extract SQL dump from it. Thanks in advance ...