jpam

dBase udf and dll

13 posts in this topic

#1 ·  Posted (edited)

hi forum peoples

for people that are using dBaseIII and dBaseIV database files

i want to share my dbase dll + udf that i wrote for one of my projects

the dll supports;  

open/create/read/write dbaseIII dbf files

open/create/read/write dBaseIV dbf files

open/create/read/write dbaseIII dbt memo files

open/create/read/write dBaseIV dbt memo files

most basic functions are in the dll

more functions wil be added when needed

dll ,udf and several samples are included in zipfile

Have fun

Jpam

 

update;

udf has now standard function headers

changed Opt("OnExitFunc", "Close_DLL") to OnAutoItExitRegister("Close_DLL")

update 02-01-2016:  

added fast powerfull case-insensitive search() function to dll with wildcard support

update 09-01-2016:  dbase.zip

added foxpro 2.x and visual foxpro read support

added foxpro 2.x fpt memo read support

added visual foxpro memo read support

Edited by jpam
1 person likes this

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

QUESTIONS: Who is the license owner for attached DLL ? What type of license is for this DLL ?

btw.

Pretty good UDF
One remark: for the functions header use the standard headers you can  add this using  SciTE4AutoIt by pressing CTRL+ALT+H

Edited by mLipok
2 people like this

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2017-06-04

Share this post


Link to post
Share on other sites

@mLipok

no licenses on this dll, wrote it myself in masm v10

SciTE4AutoIt by pressing CTRL+ALT+H does nothing in my editor

can you give me an example for a standard header?

Share this post


Link to post
Share on other sites

@mLipok

no licenses on this dll, wrote it myself in masm v10

SciTE4AutoIt by pressing CTRL+ALT+H does nothing in my editor

can you give me an example for a standard header?

Which Editor (Name+Version) currently you are using ?

Never knew about that either, you have to click on function first.

To be more precicely, just go to the line with function name declaration , and press CTRL+ALT+H
But you must install SciTE4AutoIt - Jos version you can find it here:

https://www.autoitscript.com/site/autoit-script-editor/downloads/


Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2017-06-04

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

@mLipok

Version 3.4.1

allready got it working

thx for the info

 

Edited by jpam

Share this post


Link to post
Share on other sites

If you mean SciTE it is very old version.
I think that you are using the editor supplied with AutoIt installer.

 

I encourage you to download and install a version with this link:
https://www.autoitscript.com/site/autoit-script-editor/downloads/

 


Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2017-06-04

Share this post


Link to post
Share on other sites

i downloaded the last editor

thx for the info mLipok

updated the function headers in the udf

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

update 09-01-2016:

added foxpro 2.x and visual foxpro read support

added foxpro 2.x .fpt memo read support

added visual foxpro .fpt memo read support

download at 1st post

Edited by jpam
1 person likes this

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Thank you for making this, it helps me a lot in my project.

I have run into an issue I'm hoping you can help with -- Pack($hDbf) just locks the program up. All other file operations seem to operate as needed; I can create a DBF from scratch, add records, read records, and mark records as deleted without any major issue. However, a Pack operation doesn't succeed and I need this big time. The program becomes unresponsive and requires forced closure. The record in the DBF is still there and marked as deleted. Can you recommend a way past this? Here is a sample snippet of code that does cause an unresponsive application on my side (the file does exist and has records marked for deletion):

#include <dBase.au3>

$hDbf = OpenDBF(@ScriptDir & "\_agents.dbf")
Pack($hDbf)
CloseDBF($hDbf)

Also, there seems to be a limit on length of large file names and large field names. Is this by design or is there possibly something wrong on my side? OS: Win 7 Professional x64. The following snippet produces a filename "eislarge.dbf" with a single field named "thisfieldn":

#include <dBase.au3>

$hDbf = CreateDBF("_thisfilenameislarge.dbf", $DBASEIII)
AddField($hDbf, "thisfieldnameislarge", "C", 20, 0, 0, 0)
CloseDBF($hDbf)

And if I can be so bold as to add a request -- if possible, ability to detect if a record has been marked as deleted would be useful. I would like to use this in conjuction with (or within) the GetSubRecord function. Or, is there some way of getting this information that I'm not seeing?

Edited by jwurmz

Share this post


Link to post
Share on other sites

@jwurmz

dbf filenames are 8.3 dos style, its by design.

fieldnames are 10 char zero terminated, it's allso by design.

the GetSubRecord function skips the first byte of the record, that is the record delete mark.

IsRecordDeleted() missing function :)

The pack function was tested many times, but mybe there is still a bug in the code :)

i have to dig up the source code

next week i have some spare time to look into it.

kind regards

jpam

 

 

 

Share this post


Link to post
Share on other sites

#12 ·  Posted

Hello

I would like to use this library, but Search()

Search($_hBase, $_pStr, $_fld, $_pBuf, $_len)

function doesn't work as expected. I am trying to define third parameter ("field number"), but then there is no results and function returns -1. 

Any ideas? Best Regards.

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

On 12/30/2015 at 1:00 AM, jpam said:

@mLipok

no licenses on this dll, wrote it myself in masm v10

SciTE4AutoIt by pressing CTRL+ALT+H does nothing in my editor

can you give me an example for a standard header?

Is there any chance to share the masm code?

Edited by Andreik

When the words fail... music speaks

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now