本文介绍了涉及多个表的select语句中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;

using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Data.SqlTypes;

namespace EDAIF
{
    public partial class Loanmaster : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //Page Load Begins
            if (!IsPostBack)
            {
                try
                {
                    SqlConnection connect = new SqlConnection();
                    connect.ConnectionString = ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString;
                    connect.Open();
                    SqlDataAdapter da = new SqlDataAdapter("SELECT *  ,
                                                            BRANCH.BRN_NAME,
                                                            TANK.TANK_NAME,
                                                            SECTORS.[SECTOR NAME]
                                                            FROM TANKMASTER
	                                                            LEFT JOIN BRANCH ON
		                                                            BRANCH.BRN_NO=LOANMASTER.BRN_nO
	                                                            LEFT JOIN SECTORS ON
		                                                            SECTORS.[SECTOR NUMBER]=LOANMASTER.SEC_NO
	                                                            LEFT JOIN TANK ON
		                                                             TANK.TANK_CODE=LOANMASTER.TANK_NO1
                                                                 AND TANK.TANK_CODE=LOANMASTER.TANK_NO2
                                                                 AND TANK.TANK_CODE=LOANMASTER.TANK_NO3", connect);

                    DataSet ds = new DataSet();
                    da.Fill(ds, "TANK");



选择语句中的错误请协助。新的c#







添加标签。

[/ Edit]

推荐答案


这篇关于涉及多个表的select语句中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 06:36