我是用bde连接的数据库,每次运行的时候都弹出一个登录框,如何才能将这个登录框去掉呢

解决方案 »

  1.   

    Database1.LoginPrompt := fasle;
      

  2.   

    我用的是query和datasource  datasource 的dataset设置成query
    query的databasename设置成我的数据库别名
    然后在query 的sql的属性里加上我要的表名  比如:select * from 工资查询
      

  3.   

    我刚才试验了一下,没有啊你看看我窗体文件的代码,看看设置
    ---------------------------------------
    object Form1: TForm1
      Left = 192
      Top = 110
      Width = 696
      Height = 480
      Caption = 'Form1'
      Color = clBtnFace
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      OldCreateOrder = False
      PixelsPerInch = 96
      TextHeight = 13
      object Button1: TButton
        Left = 280
        Top = 88
        Width = 75
        Height = 25
        Caption = 'Button1'
        TabOrder = 0
      end
      object Button2: TButton
        Left = 264
        Top = 256
        Width = 75
        Height = 25
        Caption = 'Button2'
        TabOrder = 1
      end
      object Query1: TQuery
        Active = True
        DatabaseName = 'DBDEMOS'
        SQL.Strings = (
          'select * from biolife')
        Left = 128
        Top = 136
      end
      object Table1: TTable
        Active = True
        DatabaseName = 'DBDEMOS'
        TableName = 'biolife.db'
        Left = 184
        Top = 128
      end
    end
      

  4.   

    你连接的是sql server 啊??刚看到。
    如果用sql server就用ADO组件,用adoconnection连接,然后设置LoginPrompt 为false;或者是你添加一个database,然后你的query连接这个database,把Database1.LoginPrompt := fasle;
      

  5.   

    wudi_1982正确~~!顶,楼主别忘了分我几分
      

  6.   

    adoconnection.LoginPrompt :=false
      

  7.   


    adoconnection.LoginPrompt :=false