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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about Databases

Status
Not open for further replies.

JonnyBRadio

Programmer
Joined
Jun 9, 2008
Messages
1
Location
US
I have an application that generates a DBF file at runtime, with a filename as specified by the user. It then saves that DBF file.

I have another application that needs to read that file. But everytime I try to open the table, I get

"PlaylistTable: Type mismatch for field 'SONGYEAR', expecting: Smallint actual: Float."

I dont understand, because the field SONGYEAR is a smallint field in both programs. I never designated it as a float anywhere.

If anyone has any ideas, I would REALLY appreciate them. I'm about to pull out my hair. Thanks!
 
Try this:
Open the form where your table is defined and double-click the TTable icon to bring up the fields editor.
Right-click inside the fields editor window and select "Select All".
Right-click inside the fields editor window again and select "Delete" (all).
Right-click inside the fields editor window one more time and select "Add all fields".
Compile and run.
Your problem should be resolved.

HTH

Roo
Delphi Rules!
 
I think that in dbf structure there is not field type 'smallint' but only 'Number' that is = float
Gianni
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top