FiveDBU with ADO support
Posted:
Fri May 03, 2013 9:54 am
by Antonio Linares
This is a work in development, though actually you can review Access databases. If you change the connection string inside FiveDBU.prg then you could manage other databases engines. Future versions will be able to choose the database engine:
https://code.google.com/p/fivewin-contributions/downloads/detail?name=fivedbu_20130503.zipFull source code included
Re: FiveDBU with ADO support
Posted:
Fri May 03, 2013 10:20 am
by Antonio Linares
Re: FiveDBU with ADO support
Posted:
Fri May 03, 2013 3:27 pm
by Antonio Linares
Re: FiveDBU with ADO support
Posted:
Fri May 03, 2013 4:53 pm
by Antonio Linares
Re: FiveDBU with ADO support
Posted:
Sat May 04, 2013 9:29 am
by Antonio Linares
Enhanced function recordset save record in fivedbu.prg:
- Code: Select all Expand view
static function RSSaveRecord( oRS, aRecord, nRecNo )
local n
if oRS:AbsolutePosition != nRecNo
oRS:Move( nRecNo, 0 )
endif
for n = 1 to oRS:Fields:Count
TRY
if oRS:Fields[ n - 1 ]:Attributes != 90 // non updateable
oRS:Fields[ n - 1 ]:Value = aRecord[ n, 2 ]
endif
CATCH
END
next
oRS:Update()
return nil
Re: FiveDBU with ADO support
Posted:
Sat May 04, 2013 1:51 pm
by Rick Lipkin
Antonio
I have not looked at your code .. but since the first ADO version .. I do get a table list but when I select any table I get this error.. the .mdb I am testing does not have a password so using a direct connection will open the database.
Rick Lipkin
Re: FiveDBU with ADO support
Posted:
Sat May 04, 2013 2:36 pm
by Antonio Linares
Re: FiveDBU with ADO support
Posted:
Sat May 04, 2013 2:38 pm
by Antonio Linares
Rick,
Could you email me your database ? thanks
Re: FiveDBU with ADO support
Posted:
Sat May 04, 2013 4:40 pm
by Antonio Linares
Implementing the queries builder:
Re: FiveDBU with ADO support
Posted:
Sat May 04, 2013 5:58 pm
by Rick Lipkin
Antonio
I sent you the sample Access database ( 11mg ) via YouSendIt.com addressed to your gmail account.
Let me know if you do not receive it to download.
Thanks
Rick Lipkin
Re: FiveDBU with ADO support
Posted:
Sat May 04, 2013 6:12 pm
by Antonio Linares
Rick,
I already got your file, tested it and got your same error. Then I googled for it and found this:
http://www.datanumen.com/aar/errors/no-read-permission.htmHowever, if you are sure you have the permission on the object, but still get this error, then it is very likely that the object information and property data are partially corrupted and Microsoft Access thinks you have no read permission for the specific object mistakenly.
it seems as that error means a corrupted access database that has to be repaired. Does Access provide that feature ? I don't think we can do that with ADO...
Re: FiveDBU with ADO support
Posted:
Sat May 04, 2013 7:06 pm
by Rick Lipkin
Antonio
The .mdb I sent you is a legacy database that I inherited for an invoicing application I have re-built using ADO ( ms jet ).
I did try a different .mdb ( much simpler ) and it did open with FiveDbu. The database I sent you has had relations and queries stripped from it and I did compact and repaired it before I sent it to you.
I can tell you that I do not have any problems opening recordsets or connections with the .mdb I sent you
Let me play with your code next week and see if I can tweak it to use the .mdb I sent you.
Thanks
Rick Lipkin
Re: FiveDBU with ADO support
Posted:
Sat May 04, 2013 7:27 pm
by Antonio Linares
Rick,
thanks so much for your great feedback and help
Re: FiveDBU with ADO support
Posted:
Sun May 05, 2013 6:48 pm
by Marc Vanzegbroeck
Antonio,
Thank you for the modified version with connection-string.I have tested it with this result.
Result with SQLite.
It's working nice. The only problem is that you can't edit an empty field. It's only possible to edit a field, if something is already in the field.
Result with MySQL.
The connection is working, but it's not possible to browse the fields since you still have to select a database after the connection, and that is not possible, because the database is already specified by IP-adress in the connection-string. It's not a real file...
That is also a little problem when you specify a SQLite-database. Here I can select the file, after entering the connection-string, but this is normaly not needed, because the file is already specified in the connection-string.
I suggest to directly browse the database, after entering the connection-string..
Re: FiveDBU with ADO support
Posted:
Mon May 06, 2013 10:35 am
by Antonio Linares
Marc,
Many thanks for your great feedback
I have just published an enhanced version that manages in a better way the connection string:
https://code.google.com/p/fivewin-contributions/downloads/detail?name=fivedbu_20130506.zipWould you mind to email me a SQLite database to test here ? Also the connection string and if there is something to install on the pc, thanks