Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. JohnMalv

    ODBC SQLFetch with MS SQL Server Issues.

    Currently the order is: SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &henv); SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC3, 0); SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc); SQLDriverConnect(hdbc, NULL, (SQLCHAR*)szdatabase, (short)(strlen(szdatabase)+1, NULL, 0...
  2. JohnMalv

    ODBC SQLFetch with MS SQL Server Issues.

    I had thought of that, but I'm pretty sure it's there. I think it even installs with Win2k and WinXP, it's not optional. The MDAC was upgraded to 2.71 as well on all machines (working and non)
  3. JohnMalv

    Single Quote in Query

    Interesting, though, in this instance, I'm quite certain the field is longer than 256 characters. In fact there are instances where it can be 10k :). Good advice though (though Unicode gives me nightmares.)
  4. JohnMalv

    Single Quote in Query

    If I have a text field which I need to put some text and ascii data via a query, however that data contains one or more single quotes, is there a way to get that data in there without changing those quotes to a uniform "alternate" character? I tried \' already, and it still fails.
  5. JohnMalv

    "No Default Driver" Troubles

    According to the person who reported the troubles, he tried (successfully) to create a DSN to the same database on the same system, while the DSN-less connection string is experiencing problems. Username is defintely a different error than this one. In fact, the only way I have personally...
  6. JohnMalv

    ODBC SQLFetch with MS SQL Server Issues.

    That's an interesting point you bring up about SERVER= not being the host machine, as well as the agent. That could become a problem later on. However, the problem right now I believe occurs BEFORE it attempts to connect to the server (if it tries to connect to one that isn't valid, it stalls...
  7. JohnMalv

    ODBC SQLFetch with MS SQL Server Issues.

    The connection string format in use is: DRIVER={SQL Server};SERVER=localhost;DATABASE=vrbtest;UID=sa;PWD=admin; This has worked on most systems I've tried (and modified for a remote SQL server). However, it has also failed on several.
  8. JohnMalv

    ODBC SQLFetch with MS SQL Server Issues.

    Sorry, I'm actually using SQLDriverConnect, I was going from memory when I sayd SQLConnect :). returncode = SQLDriverConnect(hdbc, NULL, (SQLCHAR*)szdatabase, (short)(strlen(szdatabase)+1), NULL, 0, NULL, SQL_DRIVER_NOPROMPT); Thanks for catching that though!
  9. JohnMalv

    "No Default Driver" Troubles

    I'm having this (yes, another) problem with MSSQL Server (though I'm uncertain if it's MSSQL specific yet), and I don't know if it's something on the code level or something on a system level. I suspect system level, but it's worth a shot to look into programmatic options as well. I've tried...
  10. JohnMalv

    ODBC SQLFetch with MS SQL Server Issues.

    Thanks for the response. Actually I did figure out the solution to that part of the mystery (forgot to post it here). It was actually SQLGetData that was failing, and the reason for the difference was that MSSQL apparently doesn't support SQL_ANY_ORDER (I BELIEVE from memory that's the correct...
  11. JohnMalv

    ODBC SQLFetch with MS SQL Server Issues.

    I have this odd problem I began describing on the MS SQL Server forum, but was reccommended that there may be some new insight here: I have an application that uses a basic SQLExecuteDirect, SQLFetch, SQLGetData (and an SQLDescribeCol based function to grab column numbers based on col names...
  12. JohnMalv

    ODBC MS SQL Server Non-Standard? Or Code Flaw?

    Yes, perhaps I'll post on the C++ forum. I just tried osql, and the query (same one being executed (successfully) in the application is being executed successfully there too. It looks like good data. The SQL_NO_DATA on SQLFetch is definitely the problem...
  13. JohnMalv

    ODBC MS SQL Server Non-Standard? Or Code Flaw?

    Just as an update, I tried setting a primary key for column 1, but it didn't help. Still getting SQL_NO_DATA for the SQLFetch(), but ONLY for MSSQL, not MySQL, MS Text, or PostgreSQL...
  14. JohnMalv

    ODBC MS SQL Server Non-Standard? Or Code Flaw?

    Hmm, I should probably move this to a new thread now, as I have a little more information. I'll post it here for now to see if you have more info, if not, I'll put it on a new thread. It seems the point of faulre is SQLFetch. It's returning SQL_NO_DATA. The question is why? Since it's...
  15. JohnMalv

    ODBC MS SQL Server Non-Standard? Or Code Flaw?

    Sadly, that didn't seem to help :( (Thanks for the try though, I had forgotten to patch it...but I'm still pulling the same problem data (repeated data and blank data, using the same app that works fine using the above mentioned alternate DBS systems.) Any other ideas?
  16. JohnMalv

    ODBC MS SQL Server Non-Standard? Or Code Flaw?

    I have a rather odd situation: I have an application writting in C++ (MSVC++ 6), which uses ODBC to handle some database querys. I am using standard SQLDriverConnect, SQLExecDirect, SQLFetch, and SQLGetData. I do the fetch's while fetch returns a valid result, and then do GetData (searching...

Part and Inventory Search

Back
Top