Happy Easter everyone,
I have recently been able to connect to a mariaDb through an ADODB connection and is able to programmatically create tables, insert/update/delete records.
My issue now is how to trap errors that may occur during an ADODB connection query execution. For instance, when i attempt to insert an already existing record, the program crashes. Is there a way to test for the error, and instead of the program crashing, just inform the user that the record already exists?
I'll be grateful for any assistance.
MariaDb ADO Connection Errors
Moderator: Rathinagiri
- karweru
- Posts: 220
- Joined: Fri Aug 01, 2008 1:51 pm
- DBs Used: DBF,mysql,mariadb,postgresql,sqlite,odbc
- Contact:
MariaDb ADO Connection Errors
Kind regards,
Gilbert.
Gilbert.
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: MariaDb ADO Connection Errors
I don't know much about ADO connection. However, if we do with BEGIN TRANSACTION and COMMIT we will not come across any database integrity problems.
I don't have any program crash problem in native connection to MariaDB. Is ADO faster than natural connection?
I don't have any program crash problem in native connection to MariaDB. Is ADO faster than natural connection?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- karweru
- Posts: 220
- Joined: Fri Aug 01, 2008 1:51 pm
- DBs Used: DBF,mysql,mariadb,postgresql,sqlite,odbc
- Contact:
Re: MariaDb ADO Connection Errors
Thank you Rathinagiri,
I haven't done any speed tests comparisons, but i find ADO very fast. My motivation of using ADO was mainly driven by a desire to keep my program 'monolithic'...no dependencies on external libraries, plus it supports a very wide range of RDBMS, only requiring one to install a driver.
I haven't done any speed tests comparisons, but i find ADO very fast. My motivation of using ADO was mainly driven by a desire to keep my program 'monolithic'...no dependencies on external libraries, plus it supports a very wide range of RDBMS, only requiring one to install a driver.
Kind regards,
Gilbert.
Gilbert.
- serge_girard
- Posts: 3178
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: MariaDb ADO Connection Errors
Hi Gilbert, Does MariaDB not support errornames? In that case you could check on 'duplicate record' after INSERT. Else you should count(*) the unique key of the record you want to insert. If 0 INSERT else duplicate.
Serge
Serge
There's nothing you can do that can't be done...
- dragancesu
- Posts: 926
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
Re: MariaDb ADO Connection Errors
I think that there is nothing simpler than natural links, one dll that's all
ADO is designed to work with MS databases, ODBC database to give manufacturers a client connects, it's not simply install software at the client, and adminstrative tools, set ODBC ...
ODBC sounds nice in theory but in practice it is difficult
Can you upload your program to see how it connects to the base?
ADO is designed to work with MS databases, ODBC database to give manufacturers a client connects, it's not simply install software at the client, and adminstrative tools, set ODBC ...
ODBC sounds nice in theory but in practice it is difficult
Can you upload your program to see how it connects to the base?