SQL Server compact Edition 4 (Inner Join)

Answered SQL Server compact Edition 4 (Inner Join)

  • Friday, February 01, 2013 5:52 PM
     
     

    I'm moving from MS Access database to SQL Server compact Edition 4 database.

    Can someone give translate the SQL statement below into SQL CE format?

    Dim m_sSQL_Base_DR As String = "Select * From tbl_Records_DR AS Records_DR " _
    & "INNER JOIN tbl_Records_DR_ExplainAction AS Records_EA ON Records_DR.DAutoID = Records_EA.DRefer_ID "

    Thanks,

    ADawn


    ADawn

All Replies

  • Friday, February 01, 2013 5:55 PM
    Moderator
     
      Has Code

    I believe you just want the T-SQL and not the C# code?

    Select * 
    From tbl_Records_DR AS Records_DR INNER JOIN tbl_Records_DR_ExplainAction AS Records_EA 
    ON Records_DR.DAutoID = Records_EA.DRefer_ID 

    Select *
    From tbl_Records_DR AS Records_DR INNER JOIN tbl_Records_DR_ExplainAction AS Records_EA
    ON Records_DR.DAutoID = Records_EA.DRefer_ID


    David Dye My Blog

  • Friday, February 01, 2013 6:10 PM
     
     

    Jjust the T-SQL statement translated to SQL CE.

    "Select * From tbl_Records_DR AS Records_DR " _
    & "INNER JOIN tbl_Records_DR_ExplainAction AS Records_EA ON Records_DR.DAutoID = Records_EA.DRefer_ID "


    ADawn


  • Friday, February 01, 2013 6:12 PM
    Moderator
     
      Has Code
    Select * 
    From tbl_Records_DR AS Records_DR INNER JOIN tbl_Records_DR_ExplainAction AS Records_EA 
    ON Records_DR.DAutoID = Records_EA.DRefer_ID 


    David Dye My Blog

  • Friday, February 01, 2013 6:56 PM
     
     
    Isn't that what I had? So what I was using should work?

    ADawn


  • Friday, February 01, 2013 7:01 PM
    Moderator
     
     

    SQL CE supports ANSI joins so it should work.  Are you getting an error??


    David Dye My Blog

  • Friday, February 01, 2013 7:32 PM
     
     

    Yes.

    OleDbDataAdapter internal error: invalid row set accessor: Ordinal=28 Status=UNSUPPORTEDCONVERSION.


    ADawn


  • Friday, February 01, 2013 7:35 PM
    Moderator
     
     Answered
    • Marked As Answer by tropicwhisper Friday, February 01, 2013 7:44 PM
    •