Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Violation

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello,

when i run my project i get an access violation error in the following line:

ListView1->Items->Item->Caption = DatabaseForm
->ProblemRegisterTable->FieldByName("Problem_code")
->AsString;

I've got a ListView of 7 columns, so there should be no problem....i think

Can someone tell me what a access violation error is and why its in that part of my code

Thanx
 


I didn't write my code correct, here is how i have it and this is where i got the access violation:

for( int i = 0; i < DatabaseForm->ProbleemRegisterTable
->RecordCount; i++ )
{
ListView1->Items->Item->Caption = DatabaseForm
->ProblemRegisterTable->FieldByName(&quot;Problem_code&quot;)
->AsString;
//the line above gives the error

DatabaseForm->ProbleemRegisterTable->Next();
}


Bram
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top