sensalim Posted February 7, 2008 Share Posted February 7, 2008 First, I found thishttp://dbftools.com/download/cdbfapi.zipIt's free but demo version... (real one is $25 or more)Ok, so in it, I find this function.lst (a text file)... attached.All I want to do at the moment is:-Create (overwrite ok) a DBF file name is test.dbf in currect directory (@ScriptDir ok)-Create 5 columns and under each, create 1 (or 2) rows of data (any data, really)for testing purposes (for now).I only got this far$dll = DLLOpen("CDBFAPI.DLL") $sPath = @ScriptDir & "\test.dbf" $hDBF = DLLCall($dll, "ptr", "OpenBase", "str", $sPath) MsgBox(0, "hDBF", $hDBF[0]) DLLClose($dll)It seems to work but I don't know among those functions in the attached function.list,which one do I use to create/write columns...Can anyone help?Thank you!!!Function.List.txt Link to comment Share on other sites More sharing options...
sensalim Posted February 8, 2008 Author Share Posted February 8, 2008 Here are some functions I find that may help me... // open database (open file, allocate memory, set options, // read header, fields etc) // Input: pointer to filename // Output: pointer to struct DBF or NULL if error struct DBF* OpenBase (char *filename); // close database (close file, release memory etc) // Input: pointer to DBF file // void CloseBase (struct DBF *d); // read fields and allocate memory // Input: pointer to DBF file // Output: TRUE if OK, FALSE if error // BOOL ReadFields (struct DBF *d); // insert string in Character field into read/write area // Input: pointer to DBF file, number of field, null-terminated string // void SetString (struct DBF *d, int n, char *s); // insert any value into read/write area // Input: pointer to DBF file, number of field, null-terminated string, double value // if type of field 'C', 'M', 'G', 'L' - null-terminated string is used, value is ignored // otherwise - value is used, null-terminated string is ignored // void SetValue (struct DBF *d, int i, char *s, double b); Link to comment Share on other sites More sharing options...
sensalim Posted February 8, 2008 Author Share Posted February 8, 2008 Anyone? Link to comment Share on other sites More sharing options...
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