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.
Append first row to DBF with SQL ODBC
Re: Append first row to DBF with SQL ODBC
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.
Re: Append first row to DBF with SQL ODBC
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
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