DBKit Beta 9 is now available

Just found the Database Connection, that would do the job.

Thanks

I suspect the issue was that your db property was not a DBKit.TableConnection?

Nope, i just added the db property in the App , and not in the Session, and it caused that issue

Interesting. So you originally had it in the Session and it failed but it worked when moved to the app class. That’s strange because in the web example project for DBKit it is on the Session class. Odd.

no, it’s upside down, It does work in Session, if you have Session.DB but it fails if you have it in App.DB and once i added that If target = Nil Then target = App End If it fixed the issue

In other words, the DBKit example uses Session and it works, your program use App.DB and it doesn’t work without changing session to app, is that right?

Ah. I believe for the web, it looks in the Session object because generally speaking the connections are session-specific rather than sharing a single connection for the entire app. However, I could make it check both.

Well the idea is that some times you have some threads running maintenance tasks that are not session specific and they do need DB access , and i wanted to keep one code, but in this case problem was solved fast , but as said you could take that scenario as an option .

Yes there are absolutely reasons to run it from the app rather than the session. The session is more typical but I’ll make it check both places.

@Geoff_Perlman do you have any documentation for this ?

As I try to use it, and while for simple tasks is ok, if I need to do things more complex I am completely stuck .

For example in my case I need to display the data on a listbox sorted by a date column in descending order, who I would do that ?
Then I have the dates stored as DateTime value in the db but I would like to display that to the user as Medium format or other format, how do I do that ?

I guess I will have to see how this can be used in more complex projects, while the idea is super nice , implementation needs a lot of things to be carefully updated .

Seeing that you populate automatically the data on the fields It does not allow me any control over the data.

For example for Delete part , I need to be able to do a SoftDelete, instead of real data delete, in my case I have few fields that have to be updated once a delete is initiated, like IsDeleted, DeletedAt and DeletedBy columns, so how should I use that in my case ?

Thanks

Found the docs, I guess not for me , but nice progress.

Thanks