JackieBlue
Member
Good evening. I'm very new to B4x and just doing a little bit of exploring and testing for now. One of the most common things we do in programming is connecting to a database and inserting/updating/selecting data. I did some searching here and briefly reviewed. This is what I see is recommended for using databases. Please let me know if I am incorrect.
1. Setup a B4J server on your database server.
2. Create your SQL in the config.properties of the B4J server you created
3. Add globals to Main module, add CreateRequest, CreateCommand subs.
4. Use these to create functions that execute sql
Questions:
1. So, it looks as if any SQL you want to execute must essentially be in the config.properties of the B4J server, correct?
2. Same for stored procedures, you just define in the confic.properties of the B4J server?
3. Why is all this extra work needed? Most programming languages I've used allowed me to connect to the database and call directly. Not go through the server and and configure additional commands.
I can see where this could be more secure (I'm not so sure about that honestly) but it seems like this is just a lot of extra work for minimal benefit. I hope I am missing something here.
Thanks In Advance
1. Setup a B4J server on your database server.
2. Create your SQL in the config.properties of the B4J server you created
3. Add globals to Main module, add CreateRequest, CreateCommand subs.
4. Use these to create functions that execute sql
Questions:
1. So, it looks as if any SQL you want to execute must essentially be in the config.properties of the B4J server, correct?
2. Same for stored procedures, you just define in the confic.properties of the B4J server?
3. Why is all this extra work needed? Most programming languages I've used allowed me to connect to the database and call directly. Not go through the server and and configure additional commands.
I can see where this could be more secure (I'm not so sure about that honestly) but it seems like this is just a lot of extra work for minimal benefit. I hope I am missing something here.
Thanks In Advance