如题,请教各位高手,Firebird数据库中的数组字段,该如何进行添加,读取操作,谢谢。我的配置:FireDAC + Firebird 嵌入版
解决方案 »
- 用AdoQuery 查询字段长度,提示datalength未定义,请高手帮忙看下
- 怎么改变toolbutton的大小?
- 网页中嵌了ActiveXForm,如何用ASP代码取ActiveXForm上计算得到的结果?分少了可以再加
- 小妹请教:怎样把flash(*.swf)保存到资源文件中,并且怎样在程序中调用?
- 如何对一篇文章进行关键字分析,谢谢,有什么好的算法吗?
- 我怎么能得到其中的值呢?
- 哪里有SQL SERVER 下载啊??
- 在客户端不安装任何软件的情况下,在服务器端能否对其进行远程截屏?
- 关于数据转换问题
- 200分征求一个问题:TClientSocket和Ocx的问题?
- 在DELPHI7中如何按照关键字批量搜索Tembeddedwb控件的文本内容
- 请问Delphi7下的ZIntQRCode控件,怎么打印二维码?谢谢!
UserID SmallInt not null,
GroupName Varchar(10) ,
MemberVal Varchar(10)[0:3],
Primary Key (UserID)
);
感谢您的分享,但是我接触delphi的时间不长,能否受累指点一下哪部分是设计arrayField操作的吗?谢谢!
function TdmSysTables.GetDBUsers(dbIndex: Integer; ObjectName: string = ''): string;
begin
Init(dbIndex);
sqQuery.Close;
sqQuery.SQL.Text:= 'select distinct RDB$User, RDB$User_Type from RDB$USER_PRIVILEGES ';
if ObjectName <> '' then // Specify specific Object
sqQuery.SQL.Add('where RDB$Relation_Name = ''' + UpperCase(ObjectName) + ''' ');
sqQuery.SQL.Add('order by RDB$User_Type');
sqQuery.Open;
while not sqQuery.EOF do
begin
if sqQuery.Fields[1].AsInteger = 13 then // Role
Result:= Result + '<R>';
Result:= Result + Trim(sqQuery.Fields[0].Text);
sqQuery.Next;
if not sqQuery.EOF then
Result:= Result + ',';
end;
sqQuery.Close;
end;function TFirebirdServices.AttachService: Boolean;
var
S: String;
ServiceName, Buff: array [0..255] of Char; W1, W2: Word;
B: Byte;
begin
if ServiceAttached then
raise EFBServiceError.Create('Service already attached!!!'); S := Trim(FHostName);
if (Length(S) > 0) and (UTF8UpperCase(S) <> 'LOCALHOST') then
S := FHostName + ':service_mgr'
else
S := 'service_mgr'; W1 := Length(S);
ServiceName := S; B := isc_spb_version;
S := Char(B);
B := isc_spb_current_version;
S := S + Char(B);
B := isc_spb_user_name;
S := S + Char(B);
B := Length(FUserName);
S := S + Char(B) + FUserName; B := isc_spb_password;
S := S + Char(B);
B := Length(FPassword);
S := S + Char(B) + FPassword;
W2 := Length(S); Buff := S; Result := isc_service_attach(@FArrIStatus, W1, @ServiceName, @FPServiceHandle, W2, @Buff) = 0; if not Result then
RaiseServiceErr;
end;
资料:
turbobird/unitfirebirdservices.pas turbobird/systables.pasFireBird 系统表相关SQL
PS:我接触 Delphi 时间不长,还请详细说明,谢谢!数据结构:
Create Table AryTable(
UserID SmallInt not null,
GroupName Varchar(10) ,
MemberVal Varchar(10)[0:3],
Primary Key (UserID)
);