Append first row to DBF with SQL ODBC

This forum is for eXpress++ general support.
Post Reply
Message
Author
Victorio
Posts: 633
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Append first row to DBF with SQL ODBC

#1 Post by Victorio »

Hi,
I know, this is express forum, but maye somebody know some idea.
I open Visual Foxpro database (DBF) with ODBC driver (SQL Express).
When want append first row, not work
But when append first row in Visual Foxpro after it can appending other rows.

Also in DCBROWSE, when in numeric column all values are zero, browser show blank place, but when any row has number 1,2,... then show in column also zeros.

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Append first row to DBF with SQL ODBC

#2 Post by rdonnay »

For your DCBROWSE problem, use a PICTURE clause, ie. PICTURE '99999' and make sure that the column width is wide enough to show the number.
The eXpress train is coming - and it has more cars.

Victorio
Posts: 633
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: Append first row to DBF with SQL ODBC

#3 Post by Victorio »

I mean this is not picture problem, so I can try
But now I found solution this:
first when open DBF I test if database has some record, when no,
then append one "start" record.
after it program works.

pz:=oCursorolp:reccount()
if pz=0
oCursorolp:Append({1,"99999","1","1",date(),date()+1,1,1,"1",1,"1","1",1,"1","1",1,1,1,3,1,1,1})
oCursorolp:commit()
oCursorolp:UpdateRow()
oCursorolp:Refresh()
endif

also I must do append in one row, and put all values.

And I do not know, it this is also needs, in source DBF file I enable NULL values, but now works.

This is temporary solution, because with Visual Foxpro ODBC I have more problems, and it is no support for it, later I must change to other type database

Post Reply