Jump to content

DBF reader and writer


 Share

Recommended Posts

  • 4 weeks later...

I used to use the dbf.dll made by Jerome

http://www.autoitscript.com/forum/index.ph...5308&hl=dbf

but since the last autoit release, it crashes.

In his zipped, there is a compiled exe file and it still works...

so either I go back to older autoit or find a fix to this dll...

Anyone help?

Thanks.

This is what worked for me. Edit each DllCall() function and add ":cdecl" to the return type:

from

$resr = DllCall($dll_dbf, "int", "dbOpen", "str", $db, "str", $fname, "str", $type, "int", $password)

to

$resr = DllCall($dll_dbf, "int:cdecl", "dbOpen", "str", $db, "str", $fname, "str", $type, "int", $password)

Edited by GeoBob
Link to comment
Share on other sites

This is what worked for me. Edit each DllCall() function and add ":cdecl" to the return type:

from

$resr = DllCall($dll_dbf, "int", "dbOpen", "str", $db, "str", $fname, "str", $type, "int", $password)

to

$resr = DllCall($dll_dbf, "int:cdecl", "dbOpen", "str", $db, "str", $fname, "str", $type, "int", $password)

Finally a reply :) Thanks.

I tried but it still crashes. I think it crashes on

Func dbAddRecord($db, ByRef $FV, $nbfields)
     Redim $FV[$nbfields+1]
     $f=_StringRepeat("char[256];", $nbfields)
     $s = DllStructCreate($f)
     if @Error then return ErrorDBF("dbAddRecord", $ERR_NOMEMORY)
     For $i=1 to $nbfields
         DllStructSetData($s, $i, $FV[$i-1])
     Next
     $resr = DllCall($dll_dbf, "int:cdecl", "dbAddRecord", "str", $db, "ptr", DllStructGetPtr($s))
     if $resr[0] < 0 Then 
         DllStructDelete($s)
         return ErrorDBF("dbAddRecord", $resr)
     EndIf
     For $i=1 to $nbfields
        $FV[$i-1] = DllStructGetData($s,$i)
     Next
     DllStructDelete($s)
     return 0;
EndFunc

dbCreate() and dbAddField() do not seem to crash.

So what now?

Thanks.

Link to comment
Share on other sites

  • 3 years later...

Post to learn and follow this post.

Really many talk about many possibilities of autoit that don't develop.

I don't find enough and functional examples in au3 of Planning agendas with Autoit, or invoice program, or manipulating database utilities.

Best Regards

Traducción AutoIt al Español. http://autoitespa.espanaforo.com/forum.htm . Visita el foro de AutoIt en español http://www.emesn.com/autoitforum/. I am a simple user, not a programmer.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...