FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour For Daniel - tdolphin
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
For Daniel - tdolphin
Posted: Wed Nov 14, 2012 03:43 PM

Hello Daniel ,

i found a tiny problem about the name of the field , in my database i have a field with name DESC and this cause error.

This is because the name of the field is the same as a SQL commands.

The solution is to put the name of the field between "" + name_field + ""

For example in tdolpsrv.prg , METHOD InsertFromDbf(

change the line :

cColumns += aItem + ","

with

cColumns += "" + aItem + "" + ","

Regards Maurizio

www.nipeservice.com

Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: For Daniel - tdolphin
Posted: Wed Nov 14, 2012 04:51 PM
Maurizio

I do not use the Dolphin library .. however in a standard Sql Statement you should use brackets to define fields that have spaces in between them or reserved words ...

Code (fw): Select all Collapse
cSql := "Select [Repair Number],[Desc],[Invoice Number], Balance from [Paid Invoices] "
cSql += "Where Balance <> 0"


Rick Lipkin

Continue the discussion