"user" is a system-supplied value in SQL Server, use [user] or rename the table
strBusi="select [user].userid,email,companyname,Industrytype, Industryclass,type,hot,title,content,keyword,msgdate,linkUrl "_
        & " From [User] , Business, IndustryType, IndustryClass Where messageid="&Request.QueryString("messageid") _
        & " and [user].IndustryTypeid=IndustryType.IndustryTypeid and [user].IndustryTypeid=industryclass.IndustryTypeid and [user].industryclassid=industryclass.industryclassid" _
        & " and [user].userid=business.userid"

解决方案 »

  1.   

    strBusi="select a.userid,email,companyname,Industrytype, Industryclass,type,hot,title,content,keyword,msgdate,linkUrl "_
            & " From [User] a, Business b, IndustryType c, IndustryClass d Where messageid="&Request.QueryString("messageid") _
            & " and a.IndustryTypeid=c.IndustryTypeid and a.IndustryTypeid=d.IndustryTypeid and a.industryclassid=d.industryclassid" _
            & " and a.userid=b.userid"
      

  2.   

    strBusi="select user.userid,email,companyname,Industrytype, Industryclass,type,hot,title,content,keyword,msgdate,linkUrl "_
            & " From [User] , Business, IndustryType, IndustryClass Where messageid="&Request.QueryString("messageid") _
            & " and user.IndustryTypeid=IndustryType.IndustryTypeid and [user].IndustryTypeid=industryclass.IndustryTypeid and [user].industryclassid=industryclass.industryclassid" _
            & " and [user].userid=business.userid"
      

  3.   

    把user改名
    或改为[user]在sql server中,USER 提供与 USER_NAME 系统函数相同的功能。在 CREATE TABLE 或 ALTER TABLE 语句中将 USER 和 DEFAULT 约束一起使用,或者将 USER 作为任何标准函数使用。示例
    A. 使用 USER 返回当前用户的数据库用户名
    本示例声明一个 char 类型的变量,将 USER 的当前值赋给它,然后打印该变量以及文本说明。DECLARE @usr char(30)
    SET @usr = user
    SELECT 'The current user's database username is: '+ @usr
    GO下面是结果集:----------------------------------------------------------------------- 
    The current user's database username is: dbo                            (1 row(s) affected)B. 将 USER 和 DEFAULT 约束一起使用
    本示例生成一个表,将 USER 用作销售行的销售员的 DEFAULT 约束。USE pubs
    GO
    CREATE TABLE inventory2
    (
     part_id int IDENTITY(100, 1) NOT NULL,
     description varchar(30) NOT NULL,
     entry_person varchar(30) NOT NULL DEFAULT USER 
    )
    GO
    INSERT inventory2 (description)
    VALUES ('Red pencil')
    INSERT inventory2 (description)
    VALUES ('Blue pencil')
    INSERT inventory2 (description)
    VALUES ('Green pencil')
    INSERT inventory2 (description)
    VALUES ('Black pencil')
    INSERT inventory2 (description)
    VALUES ('Yellow pencil')
    GO下面是从表 inventory2 中选择所有信息的查询:SELECT * 
    FROM inventory2
    ORDER BY part_id
    GO下面是结果集(注意 entry-person 的值):part_id     description                    entry_person                   
    ----------- ------------------------------ -----------------------------
    100         Red pencil                     dbo                            
    101         Blue pencil                    dbo                            
    102         Green pencil                   dbo                            
    103         Black pencil                   dbo                            
    104         Yellow pencil                  dbo                            (5 row(s) affected)
      

  4.   

    把user改名
    或改为[user]
      

  5.   

    --把user改为[user]
    strBusi="select a.userid,email,companyname,Industrytype, Industryclass,type,hot,title,content,keyword,msgdate,linkUrl "_
            & " From [User] a, Business b, IndustryType c, IndustryClass d Where messageid="&Request.QueryString("messageid") _
            & " and a.IndustryTypeid=c.IndustryTypeid and a.IndustryTypeid=d.IndustryTypeid and a.industryclassid=d.industryclassid" _
            & " and a.userid=b.userid"