delphi7写的连接sql server2000的学生管理系统程序,登录时提示Unknown database. Alias:dbuser.
到底是何缘故?周一就要交作业了,自己弄了好久都没找到原因,唯有请各位帮助了!!
到底是何缘故?周一就要交作业了,自己弄了好久都没找到原因,唯有请各位帮助了!!
解决方案 »
- TcpServer和TcpClient传送2进制数据方法
- 100分求教,操作系统问题
- 请问:如何用delphi做Dos命令行程序,并且可以带参数.
- :(毕业真的成问题了:在数据库中存取word文档,上40K就报错!
- 我为什么无法将memo的内容发到系统剪贴板?
- ▲▲◎◎想交几个熟悉Devexpress公司产品的朋友,共同讨论,共同提高,请留下联系方式
- 消息!!!
- 怎样得到字符串的长度
- 关于字体 的才鸟问题
- 请教各位大师一个问题,谢谢了!!!
- 如何在c和delphi之间传递二维数组?具体是C传给del写的dl一个string的字符串(指针),delphi格式化运算后返回二维数组给C的主程序?
- dll问题
能详细点吗?谢谢!
Left = 335
Top = 180
Width = 362
Height = 301
BorderIcons = [biSystemMenu]
Caption = #29992#25143#30331#38470
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
OnClose = FormClose
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object Label2: TLabel
Left = 72
Top = 85
Width = 81
Height = 16
Caption = #29992' '#25143' '#21495#65306' '
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
end
object Label3: TLabel
Left = 72
Top = 119
Width = 84
Height = 16
Caption = #23494' '#30721#65306' '
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
end
object Bevel1: TBevel
Left = 48
Top = 8
Width = 265
Height = 50
Shape = bsBottomLine
end
object Label1: TLabel
Left = 55
Top = 16
Width = 298
Height = 37
Caption = #23398#29983#31649#29702#31995#32479' '
Font.Charset = GB2312_CHARSET
Font.Color = clBlack
Font.Height = -37
Font.Name = #23435#20307
Font.Style = []
ParentFont = False
end
object Button1: TButton
Left = 64
Top = 176
Width = 65
Height = 25
Caption = #30331#38470
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlue
Font.Height = -16
Font.Name = #21326#25991#26032#39759
Font.Style = []
ParentFont = False
TabOrder = 0
OnClick = Button1Click
end
object Button2: TButton
Left = 192
Top = 176
Width = 57
Height = 25
Caption = #36864#20986
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlue
Font.Height = -16
Font.Name = #21326#25991#34892#26999
Font.Style = []
ParentFont = False
TabOrder = 1
OnClick = Button2Click
end
object edtuserID: TEdit
Left = 144
Top = 80
Width = 121
Height = 21
ImeName = #20013#25991' ('#31616#20307') - '#26234#33021' ABC'
MaxLength = 11
TabOrder = 2
OnKeyDown = edtuserIDKeyDown
end
object edtpasswd: TEdit
Left = 144
Top = 115
Width = 121
Height = 21
ImeName = #20013#25991' ('#31616#20307') - '#26234#33021' ABC'
MaxLength = 8
PasswordChar = '*'
TabOrder = 3
OnKeyDown = edtpasswdKeyDown
end
object Database1: TDatabase
AliasName = '学生'
DatabaseName = 'dbuser'
LoginPrompt = False
SessionName = 'Default'
Left = 8
Top = 56
end
object queryuser: TQuery
DatabaseName = 'dbuser'
Left = 8
Top = 88
end
end
我telnet连接不到自己的1433端口,是哪里出问题了啊。。
不过我telnet不到自己的1433端口,到底出什么问题了啊。。
ado的话,源码又要更改,而且不太会用ado连sql server
Db.DriverName := 'MSSQL';
DB.Params.Values['Host Name'] := '192.168.1.;
Db.Params.Values['Server Name'] := '192.1681';
DB.Params.Values['DataBase Name'] := 'mystock';
DB.Params.Values['user name'] := 'sa';
DB.Params.Values['Password'] := 'sa';
Db.LoginPrompt := false;
db.KeepConnection := true;
try
DB.Connected ;
except
on E : EDBEngineError do
Raise Exception.Create(E.Message);
end;
Db.DriverName := 'MSSQL';
DB.Params.Values['Host Name'] := '192.168.1.;
Db.Params.Values['Server Name'] := '192.1681';
DB.Params.Values['DataBase Name'] := 'mystock';
DB.Params.Values['user name'] := 'sa';
DB.Params.Values['Password'] := 'sa';
Db.LoginPrompt := false;
db.KeepConnection := true;
try
DB.Connected ;
except
on E : EDBEngineError do
Raise Exception.Create(E.Message);
end;