Database Question

wm.chatman

Well-Known Member
Licensed User
Longtime User
A few months back I started a database App.
Using a cmd Button for the MoveNext/MovePrevious I have to click the cmd Button, to move next or previous.

This is VisualBasic Code, is there someone that can code this to Basic4ppc code for me?

Private Sub tmrSchaltf_Timer()
If Toolbar1.Buttons("prev").value = tbrPressed Then
Data1.Recordset.MovePrevious
If Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
End If
ElseIf Toolbar1.Buttons("next").value = tbrPressed Then
Data1.Recordset.MoveNext
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
End If
End If
End Sub

Thx to all for your hlp.

Best Regards
WmC
 

glook

Member
Licensed User
Longtime User
Just an additional point:
I work with fairly large databases and I do as Erel described, but only read the ROWID of the records into the hidden table. The Forward and Previous button clicks then use the ROWID in another reader command to get all the fields just for that one record.
Works a treat and gives good performance! (was originally Erel's suggestion as I remember)

Geoff.
 

wm.chatman

Well-Known Member
Licensed User
Longtime User
Just an additional point:
I work with fairly large databases and I do as Erel described, but only read the ROWID of the records into the hidden table. The Forward and Previous button clicks then use the ROWID in another reader command to get all the fields just for that one record.
Works a treat and gives good performance! (was originally Erel's suggestion as I remember)

Geoff.
thanks Sir
 

wm.chatman

Well-Known Member
Licensed User
Longtime User
update:

getting a error here:

after saving a csv file I reload app.
there are no data in the textBox, Table1
using textBox, Table1 now

added:
Attachment

what am i missing?:confused:

Thanks

Best regards

WmC
 

Attachments

  • error.JPG
    error.JPG
    12.4 KB · Views: 266

wm.chatman

Well-Known Member
Licensed User
Longtime User
The Reader object in SQL library is a forward only reader.
If your data is not too large you can use Command.ExecuteTable and read all the data to a table which could be hidden.
Each button should be handled in his Button_Click event.
Store in a global variable the current row change it in the buttons events.
forgot to ask: your statem. If your data is not too large...:confused:
exlpain volume?

Thx

Best regards

WmC
 

klaus

Expert
Licensed User
Longtime User
With your error about OpenDialog.
Before using OpenDialog1.File do you have a line with OpenDialog1.Show.
If no, OpenDialog1.File will be empty!

Otherwise, to really be able to look at the problem you should post the code, sometimes the problem error is not in the line you think but somewhere else in the code.

Best regards.
 

wm.chatman

Well-Known Member
Licensed User
Longtime User
:)HKMF

Sub Load_Click

'Load - call Dialog load data in Table
Table1.Clear 'clear Table if data avail.
OpenDialog1.Filter = "CSV - Dateien|*.CSV"
If OpenDialog1.Show = cCancel Then Return:confused:
If OpenDialog1.File <> "" Then
Table1.LoadCSV(OpenDialog1.File, ",", False, False)
End If
End Sub
 

wm.chatman

Well-Known Member
Licensed User
Longtime User
Hallo Klaus

Here is a start

Things I am still working on:
-add Capture Picture Future using the MDA Pro Internal Cam.
Add more Buttons to Environment make it user friendly

Q: would it not be better to use a database because it needs to withstand allot of Input.There will be allot of data that needs to be added in the Field
Q: is a direct database for alot of imput not better
Q: would you maybe take a look at the Check Filter Data for me please

Thank you much for your time and your Geduld (Patience)

Best regards
WmC
 

klaus

Expert
Licensed User
Longtime User
I just looked at your program.
The error you get with
Table1.LoadCSV(OpenDialog1.File, ",", False, False)
is normal, your file TRUI.CSV is empty !

Sorry I don't have any experience with Databases.

What do you mean with 'Check Filter Data' ?

Best regards.
 

wm.chatman

Well-Known Member
Licensed User
Longtime User
Hi WmC,

What do you mean by check filter data? As Klaus said it is really not clear.

How long do you think the database should be?

What do you mean by check filter data? Ans: search criteria
2nd Ans: still thinking about that

working on:
getting to schow input from txt boxes into the tbl1

Best regards
WmC
 

klaus

Expert
Licensed User
Longtime User
I had a second look at your program.
To display the data in the table you must set the FontColor different to the backcolor. In your code both are white !?

You can filter the table, I would suggest that you put the filter on another form with a second table. You can have a look here:
http://www.b4x.com/forum/german-forum/1421-expense-tracker.html and here http://www.b4x.com/forum/share-your-creations/2136-wine-cellar-manager.html Both programs are similar.

The difference with your example is that the choices are made with predefined parameters in ComboBoxes. This makes the filtering much easier.
It could perhaps be interesting in your program to set predefined choices for certain colomns.

Best regards.
 

wm.chatman

Well-Known Member
Licensed User
Longtime User
why thank you much Sir!

I will take a peep and let you know something later.
Got a problem on this one. I have a Database UI in VB6 and it does quite alot.
Ist a new steep, using the B4PPC Interface. :(But its best...

Thx

Best regards
WmC
 

wm.chatman

Well-Known Member
Licensed User
Longtime User
I had a second look at your program.
To display the data in the table you must set the FontColor different to the backcolor. In your code both are white !?

You can filter the table, I would suggest that you put the filter on another form with a second table. You can have a look here:
http://www.b4x.com/forum/german-forum/1421-expense-tracker.html and here http://www.b4x.com/forum/share-your-creations/2136-wine-cellar-manager.html Both programs are similar.

The difference with your example is that the choices are made with predefined parameters in ComboBoxes. This makes the filtering much easier.
It could perhaps be interesting in your program to set predefined choices for certain colomns.

Best regards.
To display the data in the table you must set the FontColor different to the backcolor. In your code both are white !?
Ans: that was not the problem. I got it worked out:sign0060:
took all night and will try for a update ASAP. I am checking on something else at this time. zzz...
good night
Best regards
WmC
 

wm.chatman

Well-Known Member
Licensed User
Longtime User
Hi
good morning...

Update: TRUI v.01 (device and Laptop)
Things to Accomplish:
- Populate txtBoxes into Table1 at start up
- This will only work after you click the last tbl at bottom left
- BOF/EOF Funktion do notwork correct yet, still busting Nut on that one. (oneClick)
the first and second datasentance go beyond BOF/EOF, so working on this
is though have to check Forum for possible answer
- Gps functions
- Set a Pixel on (Geo)Topocard incase we find something (very Important)

- Integration plans:

- Gps using GpsSerial
- Scrollable appreciations and thank you to all involved
- Update to the site for B4ppc users
- http connection from App
- Add camera functions using the MDA Pro, on WM5
- Picture Viewer to check out Picture made
- Request:
- Please have a look: (if possible)
- Check for unassigned / unused variables
- I get a Error Msg that I still am unable to find
- It be very nice getting the short vb code I posted usable, this way we would not have to click cmdButts to much. I could honestly use hlp on the BOF/EOF matter. In VB that’s a Treat, and it works very well, I used a tmr and a bit of code.
- Ceaser, I borrowed a couple of items from your Ceaser_field App. I hope its OK. Very Inspirational to me. This and other matters finally opened the Blockade, and I can continue on. Thank you Sir
- I must state all my Thanks and Appreciations to the Members that help thus far!
- This morning , i spotted a bit of source on the forum and it seems like this is it…
- For the further moving on

Q: read about how to change Parent, but I cant get this.:(
would like to change the way two or 3 frms start up
a: splash
b: workarea
c: frmMain
d: bisjetzt, thank you frm
e: icon ADD

Thank you, it means very much to me.

Thx

Best regards
WmC
 

klaus

Expert
Licensed User
Longtime User
The error message 'Check for unassigned / unused variables' is warning that you use undeclared variables.
You could:
- uncheck the 'Check for unassigned / unused variables' option in the IDE
- or better declare the variables either localy in the subroutine or in the global section.
In you case line 138

you can:
in Globals write this line:
r = 0

or in
Sub Info_Click
Dim r


For the order if displaying the forms you should use
Sub App_Start
Sip(False)
TRUIMain.Show
Splash.show

instead of:
Sub App_Start
Sip(False)
TRUI.Show
Splash.show

Best regards
 

wm.chatman

Well-Known Member
Licensed User
Longtime User
:)schön, wieder von Dir zu hören und Danke für deine schnelle Antwort zum letzten Post.


Help with Database Bugs

:)Hi

I need Assistance with Database Bugs.

Everything works OK except three things:

- Sort: Area/Material/Datum
- Find: Clicking the Find Button does not bring Results
- Saving the Data: also does not wish to make me happy.
- If this would only run, I would be a very happy old Man…

What am I doing wrong? still longing for the answer that hits it on the head...:(
Thanks to all for Helping me on this! I do appreciate all the :sign0085: that we Receive! Please do not let me down, on this one
:(
Best regards:sign0013:
WmC
 
Last edited:

wm.chatman

Well-Known Member
Licensed User
Longtime User
:)schön, wieder von Dir zu hören und Danke für deine schnelle Antwort zum letzten Post.


Help with Database Bugs

:)Hi

I need Assistance with Database Bugs.

Everything works OK except three things:

- Sort: Area/Material/Datum
- Find: Clicking the Find Button does not bring Results
- Saving the Data: also does not wish to make me happy.
- If this would only run, I would be a very happy old Man…

What am I doing wrong? still longing for the answer that hits it on the head...:(
Thanks to all for Helping me on this! I do appreciate all the :sign0085: that we Receive! Please do not let me down, on this one
:(
Best regards:sign0013:
WmC

30 Oct 09
I spend the night on solving the problems, but seems like i made mistakes that I really cant find.
Could someone with a little more Experience please have a look at this, and fix.
I would really Appreciate Help on this, if possible.
Thank you
 
Top