你的数据库连接字符串可能有问题,铁出来看看。

解决方案 »

  1.   

    Prepare和连接字符串都没问题,我都把值打印出来了。存储过程为:
    CREATE PROCEDURE proclogin
    (@user_id varchar (30), @password varchar(30) ,@flag varchar(2))
     AS
    declare @tmpcount1 int
    declare @tmpcount2 int
    declare @tmpcount3 int
    select @tmpcount1=count(*)  from admin where username=@user_id and password=@password
    select @tmpcount2=count(*) from user_info where UserName=@user_id and UserPassword=@password
    select @tmpcount3=count(*) from company_info where account_id=@user_id and account_pwd=@password
    if @tmpcount1>0 
    set @flag='1'
    else 
    begin
    if @tmpcount3>0 and @tmpcount2>0
    set @flag='11'
    if @tmpcount3>0 and @tmpcount2<1
    set @flag='10'
    if @tmpcount3<1 and @tmpcount2>0
    set @flag='01'
    if @tmpcount3<1 and @tmpcount2<1
    set @flag='00'
    end
    GO
      

  2.   

    请帮忙,这个问题已经困绕我一天了