Delphi 5&水晶XI。 2(RDC)怎么办? [英] Delphi 5 & Crystal XI Rel. 2 (RDC) how to?

查看:175
本文介绍了Delphi 5&水晶XI。 2(RDC)怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用类从JosephStyons ,但我确实得到一个无效的索引错误在用户ID应该设置的行。

I'm trying to work with the class from JosephStyons but I do get an "Invalid Index" Error on the line where the "User ID" should get set.

FRpt.Database.Tables[i].ConnectionProperties.Item['User ID'] := edUserName.Text;

这是我的环境:

WinXP Sp3 ,Crystal Reports Developer XI Rel.2 SP4,Delphi 5 Update Pack 1

WinXP Sp3, Crystal Reports Developer XI Rel.2 SP4, Delphi 5 Update Pack 1

任何帮助或想法非常感谢!

Any help or ideas greatly appreciated!

Thx,
Reinhard

Thx, Reinhard

推荐答案

你对[i]的价值可能是罪魁祸首...我可以' t记得肯定,但我相信第一个表将是Table [1],而不是表[0],如预期。我改变了我的循环使用:

Your value for [i] could be the culprit...I can't remember for sure but I believe the first table will be Table[1] instead of Table[0] as one would expect. I altered my loop to use:

CrTables:= CrDatabase.Tables;

CrTables := CrDatabase.Tables;

for crTableObj in crTables do

for crTableObj in crTables do

您可以尝试使用上面所示的for循环或者从1开始而不是0开始遍历表。

You might try stepping through the table using a for loop as shown above or by starting with 1 instead of 0.

我希望这有助于。

这篇关于Delphi 5&水晶XI。 2(RDC)怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆