Excel as DB, getting exception for run query - object reference not set to an instance


I’m using excel as Database and using run query to execute update query. I have executed select query successfully using same connection hence no issue in connection.
I’m passing parameters to query [refer screenshot]. I have tried Refresh Excel Data Connection still same issue. Parameter also correct, have verified still getting exception.

Studio version: 2022.4

Thanks in advance.

Hi @Rohit_More

Try to print the values that you are passing

May i know datatype of Rank and Roll_No Column in your Database?

Hi @sb001 @Lak_Ui

Thanks for responding

In excel, it’s showing format as general.
Values are printing now (previously not), but now I’m getting error: ERROR [07002] [Microsoft][ODBC Excel Driver] Too few parameters. Expected 2.


I have now directly used the expression in query which I was assigning to parameters and it worked. But I could not figure out what is the issue with passing parameters.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.