ADODB.Recordset returns with incorrect data??
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: ADODB.Recordset returns with incorrect data??

  1. #1
    Join Date
    Apr 2015
    Posts
    2

    ADODB.Recordset returns with incorrect data??

    I have an ADO.Recordset object that is able to successfully connect to the database and pull data. However, the data that is in the database vs what is being retrieved by the object is incorrect. For example, if I take the exact query that is in the command parameter in the Recordset and execute it in Sql Server Management Studio, the RANK in SSMS is 170 but the data returned in code from the object says it is 140. Has anyone run across a situation like this before? I can't figure out why this is happening. This involves a search box where the user is trying to search for a product and the script is trying to find the product that the user most likely wants to find.

    SELECT tbl.RANK as rk, a.*, CA.* FROM FREETEXTTABLE([ab_fts],([cpn],[cd],[mas],[ac],[ttr],[nemo],[man]),'tester',1000) tbl INNER JOIN [qws] a on tbl.[key] = a.wid INNER JOIN catad CA ON (CA.cgid = a.cgid) ORDER BY rk DESC

  2. #2
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,969

    Re: ADODB.Recordset returns with incorrect data??

    It would help to see some code, can't tell how you are determining the values in any of the fields so no idea why you are seeing something different than you expect.

    Also would be good to know if both the program running the ADO code and the Management studio are running on the same PC and talking to the same server (instance)
    Last edited by DataMiser; April 21st, 2015 at 11:19 AM.
    Always use [code][/code] tags when posting code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a Codeguru.com survey!


HTML5 Development Center