This is a two-part question. And I know it has been answered, but I can't replicate successful results with the answers I'm finding, so I am throwing out all I know to beg for help.
I am connecting to a MS SQL Server table containing an ID value and field named Image that is a varbinary(max) that contains an image. Using VFP9 SP2 and ODBC Driver 18 for SQL Server. (First question: Is that the correct Driver or is there something else I should be using?)
I have no problems connecting to the SQL Server, issuing a SELECT like this:
SQL_Select = "SELECT IDNum, CAST(Image as varbinary(max)) As DocImage From ITable Where IDNum = 3"
in the SQLExec which works, returning DocImage in the cursor as Type = Q, but there is nothing in the fields.
I have tried this:
CursorSetProp('MapBinary', .T., 0)
SQL_Select = "SELECT IDNum, CAST(Image as varbinary(max)) As DocImage From ITable Where IDNum = 3"
in the SQLExec with the same results.
What piece of the puzzle am I missing? Is it the Driver? Or am I missing something in the code?
I am connecting to a MS SQL Server table containing an ID value and field named Image that is a varbinary(max) that contains an image. Using VFP9 SP2 and ODBC Driver 18 for SQL Server. (First question: Is that the correct Driver or is there something else I should be using?)
I have no problems connecting to the SQL Server, issuing a SELECT like this:
SQL_Select = "SELECT IDNum, CAST(Image as varbinary(max)) As DocImage From ITable Where IDNum = 3"
in the SQLExec which works, returning DocImage in the cursor as Type = Q, but there is nothing in the fields.
I have tried this:
CursorSetProp('MapBinary', .T., 0)
SQL_Select = "SELECT IDNum, CAST(Image as varbinary(max)) As DocImage From ITable Where IDNum = 3"
in the SQLExec with the same results.
What piece of the puzzle am I missing? Is it the Driver? Or am I missing something in the code?