SELECT not pulling in all column via ODBC

Chris Montero 11 Reputation points
2022-05-02T17:18:28.02+00:00

Hello, I’m configuring a VB application on an Azure VM and connecting to an Azure SQL server via ODBC String. I’ve got full access to the database and able to run SELECT statements. Although, I’m running into a weird issue with a few columns in the database not allowing me to read or write data to that specific column. I’ve changed the security setting on the columns it's self to full access via the client user but still not able to access it.

Note: I’m able to read and write via the SQL query analyzer no issues! Any ideas where I should be looking to correct this issue?

Azure SQL Database
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,597 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Naomi 7,366 Reputation points
    2022-05-02T17:24:58.67+00:00

    Can you check IsHidden property of the column:

    learn.microsoft.com/en-us/sql/t-sql/functions/columnproperty-transact-sql?view=sql-server-ver15

    ?


  2. Chris Montero 11 Reputation points
    2022-05-02T19:03:58.603+00:00

    Hello, using a simple Select statement:

    SELECT AES_ID, AES_ColorCode FROM IC_PROCESS WHERE AES_ID='958652'

    Data returns fine (AES_ColorCode) in SMS and Azure Studio Query. When i run the Select thought ODBC, data is blank...
    I'm thinking it's an ODBC issue, although, all other Columns return fine through ODBC!

    Very strange...


  3. Tom Phillips 17,721 Reputation points
    2022-05-02T19:04:25.907+00:00

    Are you using SELECT *? Are there >100 columns being returned?


  4. Chris Montero 11 Reputation points
    2022-05-03T00:03:33.743+00:00

    So after drilling into the SQL column design in azure, I’ve noticed that any datatype (nvarchar(MAX)) is what’s giving me the issue…
    I can’t retrieve or save anything with this datatype using ODBC…