Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Delphi Databases > EDatabaseError ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 920 of 986
Post > Topic >>

EDatabaseError - 'A component named...already exists'

by "The Rock" <George@[EMAIL PROTECTED] > Jun 23, 2006 at 12:29 AM

Hi - If anyone can assist it would be great

I am generating a quick re****t (In Delphi 7) (although this same error
occurs on a normal form as well). I have 4 TQuery components used to
extract data from an Interbase 6.0 database. One of my tables holds
"dynamic field information" (e.g. the column names are field1, field2,
field3, field4 etc.)

I create a select query string after the user has selected (in a
checklistbox) which fields (field1, field2, field3 etc.) he would like
to view in the re****t. The field selection is kept in a TStringList
(FieldList) and then added to the query sql statement.

qry3.Active := false;
qry3.SQL.Clear;
qry3.SQL.Add('select leadid,' +
frmUserLeadStatusRptFilter.FieldList.CommaText);
qry3.SQL.Add('from campaignleads');
qry3.SQL.Add('where leadid = ' + qry2.fieldbyname('leadid').asstring);
qry3.Active := true;

Interestingly, when the user selects all the fields to display I do not
get the error: (it would look like this)

select
leadid,field1,field2,field3,field4,field5,field6,field7,field8,field9,field10,field11,field12,field13
from campaignleads
where leadid = 4130

BUT when the user selects random fields (it would look like this)

select leadid,field1,field6,field7,field8,field9,field10
from campaignleads
where leadid = 3639

I get an error: EDataBaseError with message: "A component named  Field6
already exists"

Any ideas? Thanks in advance
 




 2 Posts in Topic:
EDatabaseError - 'A component named...already exists'
"The Rock" <  2006-06-23 00:29:03 
Re: EDatabaseError - 'A component named...already exists'
Dan <Doculus at CMDCsy  2006-07-01 20:04:46 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 23 16:17:06 CDT 2008.