GettingStarted:SQLite_Basics question

Did someone else followed the tutorial in this document?

I am trying to make the database example in this chapter, but I cannot get past an error message I am getting.

This code is placed in the DataControl1 Reposition Event Handler:

lID.Text = me.RecordSet.Field(“id”).StringValue
pbDelete.Enabled = true

This is the error I get when running the app:

Sub Reposition(index as integer)
lID.Text = Me.RecordSet.Field(“id”).StringValue
pbDelete.Enabled = True

End Sub

T(here is btw an error in this script because “Delete” was written in Spanish as “Borrar”, but I was able to figure that one out. )

Still no idea what else maybe be wrong. Any insight?

I also noticed that (using Datacontrol.newrecord), no new records are added to the database. I went through this tutorial 3 times, rewatching all the videos and checking my project over and over, but the same error message comes back (showing in the OP) and no records are being created.

Is the use of a Datacontrol to bind UI and database maybe not the best way to control data? (I read that in a comment somewhere).

It is NOT… and in the opinion of many (most) people here it should be avoided. Straight SQL is you best bet, and it not only is usually faster, but also makes you app database agnositic, and safer

I better don’t spent more time on this tutorial in that case. Thanks.

maybe paul should add some wording in that webpage about using the data control

II: and add a link to the project.

It would be nice to have the project file, yes. I searched for it but could not find it. Or I could post my project file so someone could debug it and then post it here?

study Eddie Electronics example, it is quite properly made.

I agree, but it’s far to complex to understand for a beginner in Xojo.

I did start with it, some 10 years ago …