CRUD...ing Databases

pliroforikos

Active Member
Licensed User
After my previous question about variables the next one trouble i think is to make CRUD functions for a database project.
It is boring especially if you have too many tables. It's worst when we need to change database design.

So my question in this:
How are you dealing with CRUDs. Which is the most efficient method?
 

Daestrum

Expert
Licensed User
Longtime User
I have never tried using B4X - I just use Ruby on Rails to do it.
 

aeric

Expert
Licensed User
Longtime User
After my previous question about variables the next one trouble i think is to make CRUD functions for a database project.
It is boring especially if you have too many tables. It's worst when we need to change database design.

So my question in this:
How are you dealing with CRUDs. Which is the most efficient method?
Not very sure about your question. I think you should go through the SQL tutorial.
Basically you can run 2 functions.
If you are using SELECT (Retrieve data) then you use ExecQuery (or ExecQuerySingleResult).
If you are using UPDATE, INSERT or DELETE then you just use ExecNonQuery.
 

pliroforikos

Active Member
Licensed User
Not very sure about your question. I think you should go through the SQL tutorial.
Basically you can run 2 functions.
If you are using SELECT (Retrieve data) then you use ExecQuery (or ExecQuerySingleResult).
If you are using UPDATE, INSERT or DELETE then you just use ExecNonQuery.
Thank you
I'm talking about repeating the same functions for different tables in the database which I find an incredibly boring process.
So i need thoughts about organizing the procedure.
 

aeric

Expert
Licensed User
Longtime User
Thank you
I'm talking about repeating the same functions for different tables in the database which I find an incredibly boring process.
So i need thoughts about organizing the procedure.
Not sure about others. I usually don’t make it more encapsulated. This will make another person taking my code even harder to understand my code in the future. I think it will make the code even difficult to modify for a specific scenario.
 
Top