# How to get the particular row from SQL query result with PYODBC conenction in Robot framework

**URL:** <https://forum.robotframework.org/t/how-to-get-the-particular-row-from-sql-query-result-with-pyodbc-conenction-in-robot-framework/6964>\
**Category:** Robot Framework\
**Created:** [7 March 2024 03:37 UTC](https://forum.robotframework.org/t/how-to-get-the-particular-row-from-sql-query-result-with-pyodbc-conenction-in-robot-framework/6964 "2024-03-07T03:37:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![samta](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@samta](https://forum.robotframework.org/u/samta)\
**Post date:** [7 March 2024 03:37 UTC](https://forum.robotframework.org/t/how-to-get-the-particular-row-from-sql-query-result-with-pyodbc-conenction-in-robot-framework/6964/1 "2024-03-07T03:37:23Z")

</div>

I am new for the data connection in Robot frame work. I have connected SQL database successfully and got the Query result. How can we define the Row index to get the particular row of query result ? This is the below code I have run but not able to get second row of the query result.  
Connect To Database Using Custom Params pyodbc DRIVER=${DbDriver},Server=${DbServer},PORT=${dbPort},DATABASE=${dbName},UID=${dbUsername},PWD=${dbPassword},Authentication=${DbAuthentication}  
sleep 30  
@{rows}= Query select \* from table  
Log to console @{rows}  
Log to console Testing the row of the sql query ${rows[3]}

This below error I am getting for this:  
Verify the sql Connection | FAIL |  
AttributeError: ‘pyodbc.Row’ object has no attribute ‘lower’

---

<div class="post-metadata">

**Author:** ![rasjani](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rasjani](https://forum.robotframework.org/u/rasjani)\
**Post date:** [7 March 2024 14:03 UTC](https://forum.robotframework.org/t/how-to-get-the-particular-row-from-sql-query-result-with-pyodbc-conenction-in-robot-framework/6964/2 "2024-03-07T14:03:27Z")

</div>

Check the full error and stacktrace from the log.html and report it back here.
