oRs:MoveFirst()
Do While .not. oRs:Eof
Select 1
Append Blank
a->Field1 := oRs:Fields("Field1"):Value
a->Field2 := oRs:Fields("Field2"):Value
oRs:MoveNext()
Enddo
CLose Databases
oRs:Close()
1) Create your .dbf
FWH already provides a ready made function for this.
FW_AdoExportToDBF( oRs, cDbf, lEditStruct )
Re: DBF to SQL script tool
New postby nageswaragunupudi » Fri Jul 11, 2014 2:37 am
Mr Hakan ONEMLI
FWH Ado functions work for Access, MS Sql, MySql, Oracle and SQLite3.
Regards
G. N. Rao.
Hyderabad, India
nageswaragunupudi
Understand.
We might consider expanding the coverage to other SQL DBMSs depending on the users' requirements.
avista wrote:Rao Thanks for replyFWH already provides a ready made function for this.
FW_AdoExportToDBF( oRs, cDbf, lEditStruct )
I have seen on this forum that this functuins are includer in version 13.08
I still use 13.04 and not ready in this moment to change version and test apps
viewtopic.php?f=3&t=28708&start=30Re: DBF to SQL script tool
New postby nageswaragunupudi » Fri Jul 11, 2014 2:37 am
Mr Hakan ONEMLI
FWH Ado functions work for Access, MS Sql, MySql, Oracle and SQLite3.
Regards
G. N. Rao.
Hyderabad, India
nageswaragunupudi
BTW I use Informix and i am not ready now to test it.
Can i find the source of functions:
function FWAdoDelRecord( oRs ) --> lSuccess
function FWAdoFieldType( oRs, n ) --> cType (xbase type)
function FWAdoFieldDec( oRs, n ) --> nDecs (xbase)
function FWAdoFieldSize( oRs, n ) --> nSize (xbase)
function FWAdoLoadRecord( oRs ) --> aRecord
function FWAdoSaveRecord( oRS, aRecord, nRecNo ) --> nil
function FWAdoStruct( oRs ) --> aStruct
function FWAdoFieldStruct( oRs, n/cname/ofield) or (oField)
-> field strut info { cName, cDbtype, nDblen, nDbdec, nAdotype, lReadwrite }
function FW_AdoExportToDBF( oRs, cDbfName, [lEditStruct] ) --> lSuccess
Best regards,
filedname, fieldtype, fieldlen, fielddec
Re: DBF to SQL script tool
New postby nageswaragunupudi » Fri Jul 11, 2014 2:37 am
Mr Hakan ONEMLI
FWH Ado functions work for Access, MS Sql, MySql, Oracle and SQLite3.
Regards
G. N. Rao.
Hyderabad, India
nageswaragunupudi
Understand.
We might consider expanding the coverage to other SQL DBMSs depending on the users' requirements.
Regards
G. N. Rao.
Hyderabad, India
But the above functions are not really difficult and one can write by himself.
Regards
G. N. Rao.
Hyderabad, India
FWH Ado functions work for Access, MS Sql, MySql, Oracle and SQLite3.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 38 guests