Results 1 to 3 of 3

Thread: Odbc Api

  1. #1
    needaname16
    Guest

    Odbc Api

    Hi,

    I have two questions regarding ODBC API:

    1) When using the create table sql statement how do I retrieve the results?

    2) (Stupid question but it is escaping me at the moment) How can I get the string in a CString to a SQLCHAR array?

    Thanks

    Needaname16

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    This may not be entirely safe, but you can probably do this:
    CString str(_T("Hello, Man"));
    SQLCHAR *sqlstr = (SQLCHAR*)strdup((const char*)str);
    // Call SQL function
    free(sqlstr);
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3
    needaname16
    Guest

    Talking

    Thanks for the reply,

    I will give that a try,

    I Just noticed my first question I actually typed wrong (what can I say I haven't had much sleep lately), the sql function I need to retrieve the results from is actually the catalog function SQLTables().

    Any Help on that topic would be appreciated.

Posting Permissions

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



Click Here to Expand Forum to Full Width