Fieldnames via odbc

I'm trying to recieve fieldnames via an odbc driver. Unfortunalty there seemed to be some drawbacks to that with Oracle.
If I use odbc_fetch_array I will get an array with the fieldnames as keys but if the fieldnames are truncated at 15 bytes.
I tried to use odbc_columns but I don't know what I should use as qualifier. As soon as I pass any qualifier to that function I won't get any rows back.

Can you log a new bug about the name truncation problem? http://bugs.php.net/bug.php?id=43688 was closed due to insufficient detail.
Regarding odbc_columns, what have you tried and what results did you get? There are some comments about the qualifier in the doc page user comments: http://www.php.net/odbc_columns
Also see http://bugs.php.net/bug.php?id=42414
What ODBC driver are you using?

Similar Messages

  • Connection to MySQL via ODBC not working

    Hello all together,
    I've got a problem with the ODBC connection to MySQL. The connection via ODBC is established and things like tnsping are working.
    When I select some data within the SQL*Plus environment, I get no real result. For example "select table_name from all_tables@mysql;" returns nothing.
    My entry in listener.ora:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME=odbc_mysql)
    (ORACLE_HOME=D:\oracle\product\11.0.1\db_1)
    (PROGRAM=dg4odbc)
    My entry in tnsnames.ora:
    MYSQL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA = (SID=odbc_mysql))
    (HS=OK)
    The initodbc_mysql.ora in ORACLE_HOME/hs/admin/:
    HS_FDS_CONNECT_INFO = odbc_mysql
    HS_AUTOREGISTER = TRUE
    HS_DB_NAME = hsodbc
    I tried some modifications but I still get no data from mysql database. When I try "select * from customer@mysql;" I get the correct number of records, the correct column names, but the content is always "¬¬¬¬". The odbc driver works, because with MS Access I can fetch the data. I'm using Oracle 11g Release 1 EE and MySQL ODBC 5.1.5.
    What could be the reason for this?
    Greetings,
    Joerg

    created in my UTF-8 Mysql DB your table and inserted a record; the select shows:
    SQL> select * from "movieclass"@mysql;
    idClass
    ClassName
    123
    H e l l o
    As you can see the content is there, the "space" between the letters is related to unicode. Each character is interpreted by 2 bytes and SQL*Plus wrongly displays both. Using iSQLPLus or SQLDeveloper does not show the "space" between the letters.
    Here the data type mapping:
    SQL> desc "movieclass"@mysql;
    Name Null? Type
    idClass NUMBER(3)
    ClassName NOT NULL NVARCHAR2(50)
    What's the exact version of DG4ODBC you're using? 11.1.0.7?
    According to the listener file you're using DG4ODBC on Windows. There was a high/low byte issue in DG4ODBC for Windows. This issue is fixed in 11.1.0.7 and a certain patch. So I recommend you to get first the 11.1.0.7 patchset (if you don't already have it installed):
    6890831 Oracle Database Family: Patchset
    11.1.0.7.0 PATCH SET FOR ORACLE DATABASE SERVER 11.1.0.7.0
    and then please apply also the latest patch:
    8689191 Oracle Database Family: Patch
    ORACLE 11G 11.1.0.7 PATCH 16 BUG FOR WINDOWS 32 BIT 11.1.0.7.0
    There was a high/low byte issue
    Edited by: kgronau on Aug 11, 2009 10:28 AM

  • Can SQL*Plus connect via ODBC to NON-Oracle data source?????

    I am struggling to understand something. I downloaded Oracle instance client, SQL*Plus and ODBC components with the hopes of being able to connect via SQL*Plus to a non-Oracle/ODBC compliant database.
    Is this possible? Or is SQL*Plus ability to connect via ODBC only to an Oracle data source??
    Thanks...

    sqlplus only connects to oracle. you can use the odbc driver from instant client to allow other applications to access oracle via odbc (e.g. excel). if you need to connect to non-oracle odbc database (ms-access, foxpro, etc.) you need odbc driver for those sources.
    you can use sqldeveloper to connect to oracle and non-oracle databases. check otn product info for sqldeveloper for more details.

  • Error when connecting to SQL*PLUS via ODBC to Excel

    OS: Windows 2000 Professional
    Oracle DB: 9i release 2
    SQL*Plus: Release 9.2.0.1.0
    MS Excel: 2000
    ===================
    When I try to connect to SQL*PLUS via ODBC to Excel with "connect scott/tiger@odbc:libro" I get the following error:
    ORA-03121: no interface driver connected - function not performed

    SQL Server objects are commonly case sensitive, so please surround the column and table names by double quotes:
    SELECT "Type_PK_ID" FROM "dbo"."boundaries"@sqlserver
    SIDE NOTE: Oracle is by default not case sensitive and all object names are stored in upper case. To get case sensitive objects they need to be surrounded by double quotes. In HSODBC case sensitive table names were commonly found even when not surrounded by double quotes as the gateway used internal SQL Server methods to find the correct table nameing - this method does not work for column names. So to be able to query a case sensitive column it needs to be surrounded by double quotes and the table name must be written as stored in the source database.

  • Problem remote connection to SQL via ODBC

    Hello, I have a server machine on which I installed the "SQL Server 2008 R2 Express." On the same machine I have configured a connection to the SQL server via ODBC and I developed a VI that uses the "LABSQL ADO function" and it perfectly communicates via ODBC with the database.
    The problem is when I try to connect to the database from a remote PC. Even on the remote PC I configured the connection via ODBC. I launch the same VI I described above, it performs correctly the ADO Connection Open the ADO connection, but the SQL Execute returned an unknown error: -2147217865. It seems that it can not find the table on which I am doing the query.
    Does anyone have any idea? I have no experience with databases and do not know what tests to do.
    Thanks a lot.

    Hi,
    actually the Microsoft error code seems to be related to not-existing table (see here).
    Anyway, this error code may result when trying to use tables with spaces or other special characters ("-", "/", "\", "?" ) in their names.
    Is this true also in the database you are using?
    Could it be an issue with permission levels?
    I hope it helps!
    Bye,
    Licia

  • MARS connection to SQL Server in JAVA via ODBC

    Hello.
    I've got this problem.
    I'm managing an application JAVA/JSP, based on a 3-tier architecture.
    The connection to the database is performed via JDBC/ODBC, in order to work with different DRMS.
    Everything is ok when connecting to Oracle or MySql via JDBC, but when we connect to SQL Server via ODBC we get this error: "ODBC SQL SERVER - Connection is busy with result for another stmt".
    That's why the application executes more than one SQL statement, opening a ResultSet object, under the same connection.
    This is the way the application is performing, and we can't change it.
    I've read that on SQL Server 2005 is available a new connection parameter called MARS (Multiple Active Result Sets), that should resolve this problem.
    But I was not able to find any way to invoke this type of connection in JAVA for an ODBC connection! (I've found only tips for .NET...).
    Many thanks if somebody can suggest me how to resolve this problem.
    It's urgent!

    Use JDBC. Get a SQL server JDBC driver. Unfortunately I don't know of any free ones, but one I have used in the past is from http://www.jnetdirect.com/
    Maybe you can search in the JDBC forum for the answer - Its a common enough question I know.

  • URGENT - Unable to link to VFP 9 tables in Access and Excel 2007 in Windows 7 32-bit via ODBC

    I have 3 VFP 9 databases and am able to connect via ODBC to 2 of the 3 in Access '07.  I can open all 3 the dbf's via FoxPro just fine and 2 months ago I could link to all 3 databases via ODBC with no troubles. I know the problem child (specifically
    Accpac/Sage acctg) is intact. Since I had to reformat my computer, I've been able to relink to everything except this one database. Any suggestions as to why I can't make the link work?
    As this is our previous system that is no longer used, I really need to get this link set up for queries and reports in Access.
    Thanks,
    Kristi
    Thanks!

    This does not appear to be related to sql server, so posting to an access forum would likely be more effective.

  • Call stored procedure(with parameters) via odbc

    In my application I like to use the below statement to call a stored procedure with parameter and return a result set.
    {CALL PP.getPerson('daniel')}
    but this will just return errors to my application.
    If I change the statement to:
    {CALL PP.getPerson(?')}
    and bind a parameter and its value, it will work.
    My question is, is it possible to call a stored procedure via ODBC without binding parameters in application? I mean, what will be my SQL equivalent if I don't want to do parameter binding in my application?
    Thanks in advance. I appreciate any help :-)

    hi 
    Please see the e.g bellow
    create proc proc_test(@SchoolNumber int,@SchoolName
    varchar(100),@StudentNumber int, @StudnentName
    varchar(100)output ,
    @StudentAddress varchar(100) output,
    @Studentbirthdate datetime output,
    @StudentPhoneNumber varchar(100) output,
    @GuardianName varchar(100) output)
    as
    begin
    select @StudnentName varchar=StudnentName ,
    @StudentAddress =StudentAddress,
    @Studentbirthdate =Studentbirthdate ,
    @StudentPhoneNumber =StudentPhoneNumber,
    @GuardianName =GuardianName
    from table where schoolno=@SchoolNumber
    and SchoolName=@SchoolName
    and StudentNumber=@StudentNumber
    return
    end
    http://technet.microsoft.com/en-us/library/ms187004(v=sql.105).aspx
    http://www.lynda.com/SQL-Server-tutorials/Using-input-output-parameters/104964/113058-4.html
    Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker

  • ODI reading Excel via ODBC on Linux

    I've got ODI loading data from Excel via ODBC with everything running on Windows, and it runs fine!
    But will this work when I run ODI on a Linux platform? Will I have to buy some kind of ODBC driver for Excel under Linux? Has anyone done this before?
    Any help gratefully received!
    Thanks
    A

    There exists a native JDBC driver for excel, it is a sourcefourge project. This allows you to read excel data irrespective of platform through JDBC rather than having to use the JDBC/ODBC bridge.

  • Trouble in extracting Via ODBC to Oracle or Access - Numbers Change

    I am running a report that I only want the group records printed. One of the group fields  shows a sum of a function from the detail records.
    The following function sj_rec is on the detail record
    WhilePrintingRecords;
    Numbervar clm_sj_amt;
    if {SJE_RECORD.SJER_TYPE} in ["S","J"] then
        clm_sj_amt := clm_sj_amt + {SJE_RECORD.SJER_AMOUNT};
    if {SJE_RECORD.SJER_TYPE} = "R" then
        clm_sj_amt := clm_sj_amt - {SJE_RECORD.SJER_AMOUNT};
    clm_sj_amt;
    Then on the Group Record we have disp_sj function
    WhilePrintingRecords;
    numberVar   clm_sj_amt;
    clm_sj_amt;
    On the crystal report  every thing looks fine.
    When I extract the  Information Via ODBC to Oracle or Access the numbers change. If I extract to Excel it is fine.
    Can you please explain why I canu2019t get on oracle the exact info displayd in crystal ???

    Please re-post if this is still an issue to the Data Connectivity - Crystal Reports Forum
    Likely differences in how ODBC links and indexes the tables.

  • Oracle Cloud connections by other databases via ODBC/JDBC/XML

    If we move to the Oracle Cloud, will these tables be available from other SQL clients via ODBC/JDBC/XML? It obviously works fine with an internally hosted Oracle solution, but I didn't know if moving the Oracle Cloud would remove these features. Thanks.

    You need a service to auto start/stop instances. Pls See
    Re: Oracle instance is going to idle when i restart/start the machineRgds,
    Ahmer

  • How query data in pl/sql via ODBC from DB2 on AS400

    Hi,
    What's the most easy way to do some selects on tables in an external (non-oracle)database via odbc?
    I only need selects, no dml-statements like inserts en updates...
    Where can I find more information about this subject?
    Filip

    You need to use Oracle Heterogeneous Services. Firstly you have to obtain and configure DB2 ODBC drivers. I got mine from ibm.com (not free) but I am sure there are some third party vendors out there. I don't know much about DB2 so I can't help you with the configuration (I asked a DB2 DBA to help me with that part).
    The rest is just setting up Oracle HS and creating the DB link. The following steps should help but there are much more detailed manuals for Oracle HS on http://tahiti.oracle.com.
    Listener Configuration
    Add the following entry into the SID_LIST part of the listener. The SID_NAME will be used in the heterogeneous services configuration
    (SID_DESC=
    (SID_NAME=db2)
    (ORACLE_HOME=D:\oracle\ora92)
    (PROGRAM=hsodbc)
    Restart the listener.
    Heterogeneous Service Configuration
    Under ORACLE_HOME\HS\admin create the following text file called initDB2.ora (the DB2 part should match the SID_NAME used in the listener configuration).
    Put the following line in the text file (the DQ01 is the name of the DB2 ODBC System DSN):
    HS_FDS_CONNECT_INFO=DQ01
    Client Configuration
    The client side refers to an Oracle database that will use the heterogeneous gateway.
    TNSNames Entry
    Put the following entry in the tnsnames.ora file (the SID part should match the SID_NAME in the listener configuration):
    DB2.telkom.co.za =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=cntrra20-esdt00)(PORT=1521))
    (CONNECT_DATA=(SID=db2))
    (HS=OK)
    Database Link
    Create a database link that references the new tnsnames.ora entry:
    create public database link db2
    connect to oratst identified by oracle using 'db2';
    Test the database link.

  • Crystal Reports XI via ODBC to Lotus Domino Database - crashes client

    As soon as I attempt to connect a CR XI report via ODBC to a particular Lotus Domino database my Crystal client crashes with the below error message in the event viewer. I regularly connect to other Lotus Notes databases but this one crashes my client everytime. Anyone have any ideas?
    Event Type: Error
    Event Source: Application Error
    Event Category: None
    Event ID: 1000
    Date: 7/16/2008
    Time: 11:45:27 AM
    User: N/A
    Computer: 2WC3PC1
    Description:
    Faulting application crw32.exe, version 11.0.0.2495, faulting module crdb_p2snote.dll, version 11.0.0.1282, fault address 0x00020f1a.
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    Data:
    0000: 41 70 70 6c 69 63 61 74 Applicat
    0008: 69 6f 6e 20 46 61 69 6c ion Fail
    0010: 75 72 65 20 20 63 72 77 ure crw
    0018: 33 32 2e 65 78 65 20 31 32.exe 1
    0020: 31 2e 30 2e 30 2e 32 34 1.0.0.24
    0028: 39 35 20 69 6e 20 63 72 95 in cr
    0030: 64 62 5f 70 32 73 6e 6f db_p2sno
    0038: 74 65 2e 64 6c 6c 20 31 te.dll 1
    0040: 31 2e 30 2e 30 2e 31 32 1.0.0.12
    0048: 38 32 20 61 74 20 6f 66 82 at of
    0050: 66 73 65 74 20 30 30 30 fset 000
    0058: 32 30 66 31 61 0d 0a 20f1a..

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • Database Access via ODBC

    Hi,
    Since recent (LMS3.2) Cisco released the Open Database Schema support. In the guidelines I find info/procedures to access the database remotely via ODBC. However only Solaris/Solaris Windows/Windows is described. Is there any info how I can access the Database (LMS installed on Sol10) remotely via a Windows system ?
    Jan

    The instructions for Windows/Windows apply, but you'll need to first get the necessary DLLs to allow for database access. The easiest way to do this would be to install Common Services from the LMS 3.2 DVD on a Windows 2003 or 2008 machine. Then extract the DLLs, and uninstall Common Services.
    It may also be possible to start the installer, have it extract the install bits to the TEMP location, then you can pull the DLLS from there. However, I have not tried this for obtaining database DLLs (only device packages).

  • Error when connecting via ODBC connections

    Alright, so....
    I have a Windows 7, 64 bit OS.  I installed Oracle 10g, I installed Crystal Reports Xi release 2.
    Via ODBC Administrator, I set up my data sources, and they all connect successfully.
    I go into Crystal Reports, create a new report, and attempt to set a new connect and use those same data sources. I get prompted for my user name and password.  I get the error:
    Logon failed.
    Details: IM004:[Microsoft][ODBC Driver Manager] Driver's SQLAllocHandel on SQL_HANDEL_ENV failed
    HELP!  I've changed security settings, I've wiped my machine and started over from scratch, I've even installed Oracle 11g. Please help!  I'm about to pull my hair out. I am sure this is probably something easy or something I've overlooked, but I give up and throw the towel in.

    Go into \windows\syswow64 and use the odbcadm32.exe located in there. It's the 32 bit version of the ODBC Administrator.
    Also, search before posting and this has been answered.
    And you need Service Pack 6 to be supported on Windows 7.
    Thank you
    Don
    Edited by: Don Williams on Aug 27, 2010 2:31 PM

Maybe you are looking for