SubSonic3.0 data cannot be queried during external connection Query

Source: Internet
Author: User

During Development today, you need to use external connection queries,

 

I can't find any data, so I tracked the code and found that the SQL statement generated after the query turned into an inner connection.

 

Continue debugging and find that the Join. JoinType. LeftInner parameter passed in when the original SqlQuery class calls the LeftInnerJoin function is not used by the CreateJoin function, as shown in figure

 

So modify it to type, as shown in the figure below.

 

I thought it should be okay... continue to execute the program and find that no data is found ~~~ It's really depressing... Continue debugging and find that SQL statements still have problems, as shown in the figure below

An INNER is added in the statement, so the query is directly aborted by an error and continues to trace Debug. However, no combined statement is found in the query ,@_@

After studying it carefully, we found that the connection string is returned from the GetJoinTypeValue function of the Join class, as shown in

Then try to modify the returned string, as shown in the figure below.

 

Finally, execute the program and the generated SQL statement is finally normal.

 

This Bug is not very complex. You only need to use Debug tracing and try to modify it more (even if you make a mistake) to find out the problem.

 

This article is original content. Keep the following information for reprinting.

As long as you want to learn and make progress together, if you are interested, you can add the Q group: SubSonic3.0 Learning Group (327360708) or Email to me (1654937 # qq.com ), I am very busy. If you have any questions, please leave a message first. Please forgive me for not replying in time.

For more questions about SubSonic3.0, refer to the blog:

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.