How to select records from SQL as it doing Navision?

Hello everyone.. my stupid question in the subject)
How to select records from SQL (for example via ADO) as it doing Navision? And to show only some records what fits on DBGrid... :) thank you))

Answers

  • RockWithNAVRockWithNAV Member Posts: 1,139
    edited 2016-04-01
    Hey elite001 ,

    If you need to select Records based on SQL Query then obviously you need to write your code in SQL as a Stored Procedure which you can call from NAV with certain Parameters. Even if you dont want to call from NAV you can do your processing form SQL Query only and it will get reflected in NAV provided it must be a NAV Tables. Let me know if i understood something wrong.
  • elite001elite001 Member Posts: 12
    Hey elite001 ,

    If you need to select Records based on SQL Query then obviously you need to write your code in SQL as a Stored Procedure which you can call from NAV with certain Parameters. Even if you dont want to call from NAV you can do your processing form SQL Query only and it will get reflected in NAV provided it must be a NAV Tables. Let me know if i understood something wrong.

    thank you for answer, but it is not that i need)) real example - i have sql table that contains about 100k+ records. On form (.net project in visual studio) placed dbgrid, so, how i can select only some records that can fits in dbgrid? if i select all records from table - program dont opens until all records not loading.. :/ sorry for my english.. and stupid questions
  • RockWithNAVRockWithNAV Member Posts: 1,139
    Hey Elite,

    You have 100k+ Records. you want to fetch some filtered records which can get completely fit in the grid which you have taken in Visual Studio. Now as this is a SQL Table you need to write a query either in SQL or in Visual Studio to get the filtered records. Condition for filtering you need to decide as which record you need to Filter.

    Theres no any Involvement of NAV code here.
Sign In or Register to comment.