rajeshontheweb Posted June 15, 2009 Posted June 15, 2009 if it is a simple dbf file, i can open it with excel such kind of small simple dbf may probably be read directlky, but i am looking for an interface or something to read dbf files in autoit. is this possible in Autoit. currently i do have ADODB connection working in ms access. but i would be glad to see a standalone application which could interact with it. i dont need to add or edit records, just need to search and view reports thats all... i did notice there has been a dll file but it looks like its obsolete, and i am not talking about DBAse dbf its VFP 7.x + dbf file. Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet
ResNullius Posted June 16, 2009 Posted June 16, 2009 Download the VFPOleDb from Microsoft here:http://www.microsoft.com/downloads/details...;displaylang=enYou can then access it using ADODB. Hint, the connection string would be something like this:$strConnection = "Provider=vfpoledb.1;Data Source=C:\MyDbfFiles;Collating Sequence=general" $oDBF = ObjCreate ("ADODB.Connection") $oDBF.Open ($strConnection)Where C:\MyDbfFiles is the folder the dbf file is in.Have fun!
rajeshontheweb Posted June 16, 2009 Author Posted June 16, 2009 thanks for the insight, but i've been through it. trouble is with VFP ODBC Driver / VFP OLE DB Provider has to beinstalled on the pc ! you first need the MDAC components and then the oledb be installed (MDAC 2,.8 doesnt come with oledb provider now...) this is the way i am working since about 5 years but after a long time i gave a thought on it and felt i could search and see if someone has provided a dll or something that would allow me to read the dbf files without MS drivers. cos MS drivers need installing first then connect with ADODB. Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet
ResNullius Posted June 16, 2009 Posted June 16, 2009 The only other thing I've come across that works reliably and lends itself to scripting is this command line tool:http://www.whitetown.com/cdbflite/Not free...
rajeshontheweb Posted June 16, 2009 Author Posted June 16, 2009 yeah should have mentioned that, CDBF was one such product i came across but of course, its not free. and i am very bad at violating product licenses. i want license terms not be violated (to the farthest extent possible!) i aint buy it so i am not gonna use it! i was wondering if autoit had some functionality or people here (just like u people are showing interest, this is exactly the reason i put it here , thanks u guys) Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet
rosmild Posted January 29, 2010 Posted January 29, 2010 (edited) Hi, probably you are not interested in, but I've just made this script to extract rows from csv files and write in dbf files: Global $Dbf Global $File_in = "C:\input.csv" Global $File_out = "output" Func OpenDBFConn($Path) $Conn = ObjCreate("ADODB.Connection") $Conn.Open ("Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & $Path & ";" & _ "Extended Properties=""DBASE IV;"";" ) Return $Conn EndFunc $Dbf = OpenDBFConn("c:\") $Dbf.Execute ("Create Table " & $File_out & " (code char(4), codeclient char(10), Doc_number char(10), sender char(50), email char(50))") $file = FileOpen($File_in, 0) $lineCount = 0 If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf While 1 $lineCount += 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop If $lineCount > 1 Then $field = StringSplit($line, ";") $Dbf.Execute ("Insert into " & $File_out & " Values('" & $field[1] & "','" & $field[2] & "','" & $field[3] & "','" & $field[4] & "','" & $field[5] & "')") EndIf Wend FileClose($file) Rosmild Edited January 29, 2010 by rosmild
jchd Posted January 29, 2010 Posted January 29, 2010 if it is a simple dbf file, i can open it with excel such kind of small simple dbf may probably be read directlky, but i am looking for an interface or something to read dbf files in autoit. is this possible in Autoit. currently i do have ADODB connection working in ms access. but i would be glad to see a standalone application which could interact with it. i dont need to add or edit records, just need to search and view reports thats all...i did notice there has been a dll file but it looks like its obsolete, and i am not talking about DBAse dbf its VFP 7.x + dbf file.You seem to know a number of related products/interfaces already, but wouldn't this fit your need for "search and view reports"? Sorry if you already know it isn't suitable for you, I'm just trying to help. Disclaimer: I didn't try it and I don't "recommend" it (but the thing looks like OK). This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now