Hi all,
I need help how to create DBF file and insert data from ADO Recordset
Best regards,
Hi all,
I need help how to create DBF file and insert data from ADO Recordset
Best regards,
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 )
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.
Understand.
We might consider expanding the coverage to other SQL DBMSs depending on the users' requirements.
Rick, Rao, anyone ?
Any sugestion please ?
REgards,
avista wrote:Rao Thanks for reply
FWH 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=30
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
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,
Avista,
We can help you with FW_AdoExportToDBF() (I will check it with Rao and I may send you some code by email) but as Rao has clearly explained to you, if you want to use the result of our hard work, you should upgrade your FWH version, thanks for understanding it.
You can keep using FWH 13.04, upgrade to FWH 14.06, copy the required functions that you need and continue using 13.04.
I am sure that you also ask your customers to get paid by your work ![]()
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.