是这样的我在服务器上写:
procedure insertdata(const username,password:WideString);safecall;procedure TTextserver.insertdata(const username,password:WideString);safecall;
begin
with gy_table do
begin
close;
sql.Clear;
sql.add('insert into table1 (username,password) values('''+username+''','''+password+''' )');
ExecSQL;
end;
end;在客户端可以调用socketconnection.appserver.insertdata('''+username.text+''','''+password.text+''');可我写了一个
function Get_power(const username, password: WideString): WideString;safecall;
function TTextserver.Get_power(const username, password: WideString): WideString;safecall;
begin
with gy_table do
begin
close;
sql.clear;
sql.add('select * from table1 where username='''+username+''' and password='''+password+''' ');
if not eof then
result:=fieldbyname('power').asstring
else
result:='error';
end;
end;在客户端就是不让用这个方法,为什么呀?(我类别库用的不好)
procedure insertdata(const username,password:WideString);safecall;procedure TTextserver.insertdata(const username,password:WideString);safecall;
begin
with gy_table do
begin
close;
sql.Clear;
sql.add('insert into table1 (username,password) values('''+username+''','''+password+''' )');
ExecSQL;
end;
end;在客户端可以调用socketconnection.appserver.insertdata('''+username.text+''','''+password.text+''');可我写了一个
function Get_power(const username, password: WideString): WideString;safecall;
function TTextserver.Get_power(const username, password: WideString): WideString;safecall;
begin
with gy_table do
begin
close;
sql.clear;
sql.add('select * from table1 where username='''+username+''' and password='''+password+''' ');
if not eof then
result:=fieldbyname('power').asstring
else
result:='error';
end;
end;在客户端就是不让用这个方法,为什么呀?(我类别库用的不好)
解决方案 »
- 多线程调用函数,参数值会改变吗?
- 问一个COM的问题(Type Library)
- SOS求助:如何将做好的Web应用程序发布出来(也就是可以直接用浏览器观看)
- 一个小问题。
- 关于'''用法的问题?(在线等待)
- 如何使用ADO连接Paradox7数据库?
- delphi在进行ADO连接ORACEL816时,编译出现“发生了一个ORACLE错误,但无法从ORACLE中恢复错误信息。”ADO连接也显示“连接测试成功”了
- 生成一个列可以变化的表,并对该表进行操作
- 对一段代码的不理解???
- 紧急求助~~关于VARCHAR(1000)的字段
- 问两个有关ADOQuery+Foxpro开发的问题
- 如何将已做好的工程做成DLL?请高手指教!
function Get_power(const username, password: WideString): WideString;safecall;
function TTextserver.Get_power(const username, password: WideString): WideString;safecall;
begin
with gy_table do
begin
close;
sql.clear;
sql.add('select * from table1 where username='''+username+''' and password='''+password+''' ');open <----------- 加 1句if not eof then
result:=fieldbyname('power').asstring
else
result:='error';
end;
end;