SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Senior Member
    Join Date
    Jul 2001
    Posts
    207
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I get DB error in silk scripts when i query for columns names of a table

    i want to get the list of columns in a table in oracle using odbc dsn :-

    hstmt = DB_Columns(hdbc, "", "", "tablename", "")
    but i get an error as follows

    *** Error: (HYC00) [Oracle][ODBC]Optional feature not implemented.

    i also tried the following

    hdbc = DB_Connect("dsn=MAG123;uid=MAGSTG;pwd=MAGSTG")
    hstmt = DB_ExecuteSql(hdbc, "desc tablename")
    where tablename is valida table type.

    When i execute this i get an error "** Error: (42000) [Oracle][ODBC][Ora]ORA-00900: invalid SQL statement"

    I am able to query regular statements as "select * from tablename" but to get the list of columns for a table i get the above error.

    [This message has been edited by jcrvs (edited 09-17-2001).]

  2. #2
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: I get DB error in silk scripts when i query for columns names of a table

    The error is not generated by silktest; silktest is merely passing on the error it received fom the odbc driver, which (as it says) doesn't have an implementation for the optional SQLColumns function, so unless you find a different odbc driver which does have this optional feature, you simply can't do it.
    I know that both Oracle and Microsoft issue odbc drivers for oracle databases, but I don't know of the differences between them. It's worth checking out I suppose.

    ------------------

  3. #3
    Member
    Join Date
    Aug 2000
    Posts
    58
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: I get DB error in silk scripts when i query for columns names of a table

    hi,

    Here is the code. It works.

    <pre>
    [-] testcase test ()
    [ ] HDATABASE hdbc
    [ ] HSQL hstmnt
    [ ] hdbc = DB_Connect ("DSN=AlarmLoggerDSN;UID=sa")
    [ ] STRING colname, sColName, ignore
    [ ] hstmnt = DB_Columns (hdbc, NULL, NULL, "AlarmDetail", "%")
    [-] while (DB_FetchNext (hstmnt, ignore, ignore, ignore, sColName) == TRUE)
    [ ] print (sColName)
    [ ]
    [ ]
    </pre>

    Yamini
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by jcrvs:
    i want to get the list of columns in a table in oracle using odbc dsn :-

    hstmt = DB_Columns(hdbc, "", "", "tablename", "")
    but i get an error as follows

    *** Error: (HYC00) [Oracle][ODBC]Optional feature not implemented.

    i also tried the following

    hdbc = DB_Connect("dsn=MAG123;uid=MAGSTG;pwd=MAGSTG")
    hstmt = DB_ExecuteSql(hdbc, "desc tablename")
    where tablename is valida table type.

    When i execute this i get an error "** Error: (42000) [Oracle][ODBC][Ora]ORA-00900: invalid SQL statement"

    I am able to query regular statements as "select * from tablename" but to get the list of columns for a table i get the above error.

    [This message has been edited by jcrvs (edited 09-17-2001).]
    <HR></BLOCKQUOTE>



    ------------------

  4. #4
    Senior Member
    Join Date
    Jul 2001
    Posts
    207
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: I get DB error in silk scripts when i query for columns names of a table

    It worked
    I checked with setting various config parameters and got various errors as
    *** Error: (HYC00) [Microsoft][ODBC driver for Oracle]Driver not capable

    and other times
    *** Error: (IM001) [Microsoft][ODBC Driver Manager] Driver does not support this function

    but as you said if i specify NULL parameters then it works
    Thanks a lot

  5. #5
    Member
    Join Date
    Feb 2001
    Location
    New York, NY
    Posts
    41
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: I get DB error in silk scripts when i query for columns names of a table

    I hate when Silk's documentation is incorrect. Thanks Yamini, I had the same issue.

    ------------------
    -Lev Aks
    lev_aks@in-nyc.com

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 03:48 PM.

Copyright BetaSoft Inc.